Good afternoon
I try to complete the task many times! Same error.
- pipeline job ‘nginx-container’ is not configured to build and deploy the ‘nginx-app’ app.
Tell me what could be wrong?
Here’s the pipeline:
pipeline {
agent { label 'stapp02'}
stages {
stage('Build') {
steps {
sh """
rm -rf /home/steve/workspace/nginx-container/mr_job
git clone http://git.stratos.xfusioncorp.com/sarah/mr_job.git
cd /home/steve/workspace/nginx-container/mr_job
docker build -t stregi01.stratos.xfusioncorp.com:5000/nginx:latest .
docker push stregi01.stratos.xfusioncorp.com:5000/nginx:latest
"""
}
}
stage('Deploy') {
steps {
sh """
docker ps -a --format '{{.Names}}' | grep -q ^nginx-app\$ && docker stop nginx-app && docker rm nginx-app
docker run --name nginx-app -p 8080:80 -d stregi01.stratos.xfusioncorp.com:5000/nginx:latest
"""
}
}
}
}
thor@jump_host ~$ curl http://stapp02:8080
Welcome to xFusionCorp Industries!