-
Type:
Bug
-
Status: Resolved
-
Resolution: Done
-
Affects Version/s: 2.16.0
-
Fix Version/s: 2.16.1
-
Component/s: None
-
Labels:None
The image is effectively pushed to artifactory, but gets the "Could not find manifest.json in Artifactory in the following path: ..." error.
It seems like we are searching for the manifest at
https://artifactory.sigfox.io/docker-snapshots/docker-snapshots/software-factory/oplog-tail/1.0.0-SNAPSHOT/manifest.json
but it should be
https://artifactory.sigfox.io/docker-snapshots/software-factory/oplog-tail/1.0.0-SNAPSHOT/manifest.json
(repo path duplication).
So the build fails with a NPE and do not upload the build info.
Script used to reproduce below.
note the docker-snapshots both in tag and Docker.push
pipeline {
agent none
stages {
stage('Build & Deploy snapshot'){
when
agent any
steps {
script {
def server = Artifactory.server 'artifactory-sigfox'
def rtDocker = Artifactory.docker server: server
version = sh (
script: 'cat package.json | grep version | head -1 | awk -F: \'
\' | sed \'s/[",]//g\'',
returnStdout: true
).trim()
tag = "artifactory.sigfox.io/docker-snapshots/software-factory/oplog-tail:$version-SNAPSHOT"
echo tag
sh "docker build -t $tag ."
def buildInfo = rtDocker.push tag, 'docker-snapshots'
server.publishBuildInfo buildInfo
}
}
}
}
}