Although Everything work fine.
Jenkins - Level 3 - Task 3 … @mmumshad please help me out
Sorry for the inconvenience caused. As per the recent pipeline script you shared, seems like you are creating a container as well using the built image, which is not asked in the task requirements, but it should be fine as far as your pipeline job is working fine even with multiple attempts. The validation can try to run the pipeline multiple times so you need to make sure it always passes.
Please give it another try as we have made some changes from our end so it should work fine now.
HI @inderpreetaps Thanks I think there was some issue from tasks end, I have completed this time. Used the same pipeline just without running the container.
Thanks…
I raised issue with this lab in another Topic: Jenkins Level3 - task Jenkins Build Images - #6 by sarhipov
this works but a node connection with the label e.g. stapp01 must be created. then install java on app server using yum install java-11-openjdk -y
Then create the pipeline and add the script
pipeline {
agent {
label 'stapp01'
}
stages {
stage('Build') {
steps {
git branch: "master", url: "http://git.stratos.xfusioncorp.com/sarah/web.git"
sh 'docker build -t stregi01.stratos.xfusioncorp.com:5000/nginx:latest .'
sh 'docker push stregi01.stratos.xfusioncorp.com:5000/nginx:latest'
}
}
}
}
Best solution for this problem
this works but a node connection with the label e.g. stapp01 must be created. then install java on app server using yum install java-11-openjdk -y
also install jdk17 "yum install -y java-17-openjdk.x86_64
"
Then create the pipeline and add the script
pipeline {
agent {
label 'stapp01'
}
stages {
stage('Build') {
steps {
git branch: "master", url: "http://git.stratos.xfusioncorp.com/sarah/web.git"
sh 'docker build -t stregi01.stratos.xfusioncorp.com:5000/nginx:latest .'
sh 'docker push stregi01.stratos.xfusioncorp.com:5000/nginx:latest'
}
}
}
}