Compare commits

..

9 Commits

Author SHA1 Message Date
vincent
df9748fe27 updated 2023-02-28 23:19:06 +08:00
vincent
af942bef61 fix 2023-02-28 23:05:01 +08:00
vincent
2ed812322f with condition 2023-02-28 22:56:47 +08:00
vincent
1134eee175 finish 2023-02-28 22:45:04 +08:00
vincent
e4699d2a51 fix and trty 2023-02-28 22:32:57 +08:00
vincent
6ce5b6dad0 fix and fix 2023-02-28 22:23:26 +08:00
vincent
7732b0c3f8 test 1.4 2023-02-28 22:14:34 +08:00
vincent
c9c849a56e try and try 2023-02-28 22:03:26 +08:00
vincent
257bc88a87 make variable 2023-02-28 21:45:16 +08:00

View File

@@ -41,22 +41,38 @@ pipeline {
if (TAGNAME == ""){
return;
}
sh'''
docker login --username=${dockerUser} --password=${dockerPassword}
echo "scrolltech/bridge:${TAGNAME}"
docker manifest inspect "scrolltech/bridge:${TAGNAME}" > /dev/null
echo $?
'''
// sh "docker login --username=${dockerUser} --password=${dockerPassword}"
// sh "make -C bridge docker"
// sh "make -C coordinator docker"
// sh "docker tag scrolltech/bridge:latest scrolltech/bridge:${TAGNAME}"
// sh "docker tag scrolltech/coordinator:latest scrolltech/coordinator:${TAGNAME}"
// sh "docker push scrolltech/bridge:${TAGNAME}"
// sh "docker push scrolltech/coordinator:${TAGNAME}"
sh "docker login --username=$dockerUser --password=$dockerPassword"
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
script {
try {
sh "docker manifest inspect scrolltech/bridge:$TAGNAME > /dev/null"
} catch (e) {
// only build if the tag non existed
//sh "docker login --username=${dockerUser} --password=${dockerPassword}"
sh "make -C bridge docker"
sh "docker tag scrolltech/bridge:latest scrolltech/bridge:${TAGNAME}"
sh "docker push scrolltech/bridge:${TAGNAME}"
throw e
}
}
}
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
script {
try {
sh "docker manifest inspect scrolltech/coordinator:$TAGNAME > /dev/null"
} catch (e) {
// only build if the tag non existed
//sh "docker login --username=${dockerUser} --password=${dockerPassword}"
sh "make -C coordinator docker"
sh "docker tag scrolltech/coordinator:latest scrolltech/coordinator:${TAGNAME}"
sh "docker push scrolltech/coordinator:${TAGNAME}"
throw e
}
}
}
}
}
}
}
}
}
}