Jenkins Build Images Task Failed, Pipeline Build Successfull

Hi,

I am trying to complete my Jenkins Build Image, though my pipeline is building successfully upon manual build. However, task is being failed with error as:
pipeline job ‘nginx-container’ is not configured to build/push the required image.

I tried multiple pipeline but tasks is failing, here are the pipelines used:

pipeline {
    agent {
        label 'stapp02'
        
    }
    
    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'
                
            }
            
        }
        
    }
    
}

Second pipeline:

pipeline {
    agent {
        label 'stapp02'
        
    }
    stages {
        stage('Build') {
            steps {
                script {
                    git credentialsId: 'git', url: 'http://git.stratos.xfusioncorp.com/sarah/web.git'
                    def dockerImage = docker.build('stregi01.stratos.xfusioncorp.com:5000/nginx:latest')
                    dockerImage.push()
                    
                }
                
            }
            
        }
        
    }
    
}

Console output:

Started from command line by admin
[Pipeline] Start of Pipeline
[Pipeline] node
Running on app02 in /home/steve/workspace/nginx-container
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] git
The recommended git tool is: NONE
No credentials specified
Cloning the remote Git repository
Cloning repository http://git.stratos.xfusioncorp.com/sarah/web.git
 > git init /home/steve/workspace/nginx-container # timeout=10
Fetching upstream changes from http://git.stratos.xfusioncorp.com/sarah/web.git
 > git --version # timeout=10
 > git --version # 'git version 2.43.0'
 > git fetch --tags --force --progress -- http://git.stratos.xfusioncorp.com/sarah/web.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url http://git.stratos.xfusioncorp.com/sarah/web.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
Checking out Revision b4cf8f441a321b316286a9eeec8b25c5a5fbe12c (refs/remotes/origin/master)
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git config core.sparsecheckout # timeout=10
 > git checkout -f b4cf8f441a321b316286a9eeec8b25c5a5fbe12c # timeout=10
 > git branch -a -v --no-abbrev # timeout=10
 > git checkout -b master b4cf8f441a321b316286a9eeec8b25c5a5fbe12c # timeout=10
Commit message: "Added dockerfile"
First time build. Skipping changelog.
[Pipeline] sh
+ docker build -t stregi01.stratos.xfusioncorp.com:5000/nginx:latest .
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 109B done
#1 DONE 0.1s

#2 [internal] load metadata for docker.io/library/nginx:stable-alpine3.17-slim
#2 DONE 0.9s

#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [1/2] FROM docker.io/library/nginx:stable-alpine3.17-slim@sha256:5893dc08a2cb01e21592ff469346ebaacf49167fbc949f45e1c29111981b0427
#4 resolve docker.io/library/nginx:stable-alpine3.17-slim@sha256:5893dc08a2cb01e21592ff469346ebaacf49167fbc949f45e1c29111981b0427
#4 ...

#5 [internal] load build context
#5 transferring context: 57B 0.1s done
#5 DONE 0.1s

#4 [1/2] FROM docker.io/library/nginx:stable-alpine3.17-slim@sha256:5893dc08a2cb01e21592ff469346ebaacf49167fbc949f45e1c29111981b0427
#4 resolve docker.io/library/nginx:stable-alpine3.17-slim@sha256:5893dc08a2cb01e21592ff469346ebaacf49167fbc949f45e1c29111981b0427 0.1s done
#4 sha256:3c854c8cbf469fda815b8f6183300c07cfa2fbb5703859ca79aff93ae934961b 0B / 3.38MB 0.1s
#4 sha256:de5d475193dd13b444c2e58fc772d8a3297e370eb90e67e483095bb25f1861a6 0B / 1.80MB 0.1s
#4 sha256:b407bcc8063852cf7b980fa6d83d6caa2c17b2fa4c10e87835d72f21ed40c41a 0B / 625B 0.1s
#4 sha256:5893dc08a2cb01e21592ff469346ebaacf49167fbc949f45e1c29111981b0427 9.04kB / 9.04kB done
#4 sha256:d0f2d6365b23b7015088c88ee42f119cf585d05558a72d55625e54454c78d3e6 2.11kB / 2.11kB done
#4 sha256:ee5112eafd255a2c921521a50e807fefd946c83b6d623260ff1d01e856423454 7.15kB / 7.15kB done
#4 sha256:3c854c8cbf469fda815b8f6183300c07cfa2fbb5703859ca79aff93ae934961b 3.38MB / 3.38MB 0.2s done
#4 sha256:de5d475193dd13b444c2e58fc772d8a3297e370eb90e67e483095bb25f1861a6 1.05MB / 1.80MB 0.3s
#4 sha256:b407bcc8063852cf7b980fa6d83d6caa2c17b2fa4c10e87835d72f21ed40c41a 625B / 625B 0.3s done
#4 sha256:da33b1ad0ac4b49641e40469216939f6488c1d8116b2513ba2caa561d4898067 0B / 954B 0.3s
#4 sha256:a0fbd691d7c1a07fbdeb8b338578f4e199a49e2491eff171105eb0dc7cf61628 0B / 768B 0.3s
#4 sha256:de5d475193dd13b444c2e58fc772d8a3297e370eb90e67e483095bb25f1861a6 1.80MB / 1.80MB 0.3s done
#4 sha256:da33b1ad0ac4b49641e40469216939f6488c1d8116b2513ba2caa561d4898067 954B / 954B 0.4s done
#4 sha256:a0fbd691d7c1a07fbdeb8b338578f4e199a49e2491eff171105eb0dc7cf61628 768B / 768B 0.4s done
#4 extracting sha256:3c854c8cbf469fda815b8f6183300c07cfa2fbb5703859ca79aff93ae934961b
#4 sha256:16eaaaf5f1c0db05389b2c1c2d90db8c9154289520fad38d580acdf2390e846e 1.40kB / 1.40kB 0.5s done
#4 extracting sha256:3c854c8cbf469fda815b8f6183300c07cfa2fbb5703859ca79aff93ae934961b 1.4s done
#4 extracting sha256:de5d475193dd13b444c2e58fc772d8a3297e370eb90e67e483095bb25f1861a6
#4 extracting sha256:de5d475193dd13b444c2e58fc772d8a3297e370eb90e67e483095bb25f1861a6 1.0s done
#4 extracting sha256:b407bcc8063852cf7b980fa6d83d6caa2c17b2fa4c10e87835d72f21ed40c41a
#4 extracting sha256:b407bcc8063852cf7b980fa6d83d6caa2c17b2fa4c10e87835d72f21ed40c41a 0.4s done
#4 extracting sha256:da33b1ad0ac4b49641e40469216939f6488c1d8116b2513ba2caa561d4898067
#4 extracting sha256:da33b1ad0ac4b49641e40469216939f6488c1d8116b2513ba2caa561d4898067 0.4s done
#4 extracting sha256:a0fbd691d7c1a07fbdeb8b338578f4e199a49e2491eff171105eb0dc7cf61628
#4 extracting sha256:a0fbd691d7c1a07fbdeb8b338578f4e199a49e2491eff171105eb0dc7cf61628 0.6s done
#4 extracting sha256:16eaaaf5f1c0db05389b2c1c2d90db8c9154289520fad38d580acdf2390e846e
#4 extracting sha256:16eaaaf5f1c0db05389b2c1c2d90db8c9154289520fad38d580acdf2390e846e 0.6s done
#4 DONE 5.2s

#6 [2/2] COPY index.html /usr/share/nginx/html/
#6 DONE 0.4s

#7 exporting to image
#7 exporting layers
#7 exporting layers 0.8s done
#7 writing image sha256:92f60941822ae06447c5311a477704d8cc4bd389cbada535d314168f8bc1d851 done
#7 naming to stregi01.stratos.xfusioncorp.com:5000/nginx:latest done
#7 DONE 0.8s
[Pipeline] sh
+ docker push stregi01.stratos.xfusioncorp.com:5000/nginx:latest
The push refers to repository [stregi01.stratos.xfusioncorp.com:5000/nginx]
cb10231d1748: Preparing
66afb7c3e6d1: Preparing
439be94dd989: Preparing
08761a690f84: Preparing
419b89bbfa3b: Preparing
5fa2288e0d6e: Preparing
f4111324080c: Preparing
5fa2288e0d6e: Waiting
f4111324080c: Waiting
cb10231d1748: Pushed
66afb7c3e6d1: Pushed
419b89bbfa3b: Pushed
439be94dd989: Pushed
08761a690f84: Pushed
f4111324080c: Pushed
5fa2288e0d6e: Pushed
latest: digest: sha256:bf58af02d9fd98c6b90ae53b15c14a3d5ea780f9fe9406a7246d86e2045980c2 size: 1775
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS

Hi @abhishekshukla.sh

Apologies for the delayed response, and thank you for pointing this out. It seems that with the Docker version upgrade, a few changes were needed in the validation script. It should be good now.

Hi @inderpreetaps

It works now, thank you!