Skip to content

Commit

Permalink
FDN-2492 try to check if manifest-tool exists before installing it (#108
Browse files Browse the repository at this point in the history
)

* try to check if manifest-tool exists before installing it

* check if manifest-tool exists
  • Loading branch information
kyrylyuk-andriy authored Jun 26, 2024
1 parent c427734 commit f7f41db
Showing 1 changed file with 42 additions and 30 deletions.
72 changes: 42 additions & 30 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ pipeline {
semver = VERSION.printable()
env.NODEVERSION = "18"
sh """
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
if ! [ -f manifest-tool ]; then
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
fi
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/node${NODEVERSION}-ARCH:$semver --target flowdocker/node${NODEVERSION}:$semver
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/node${NODEVERSION}-ARCH:latest --target flowdocker/node${NODEVERSION}:latest
"""
Expand Down Expand Up @@ -201,11 +203,13 @@ pipeline {
semver = VERSION.printable()
env.NODEVERSION = "20"
sh """
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
if ! [ -f manifest-tool ]; then
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
fi
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/node${NODEVERSION}-ARCH:$semver --target flowdocker/node${NODEVERSION}:$semver
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/node${NODEVERSION}-ARCH:latest --target flowdocker/node${NODEVERSION}:latest
"""
Expand Down Expand Up @@ -294,11 +298,13 @@ pipeline {
semver = VERSION.printable()
env.NODEVERSION = "18"
sh """
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
if ! [ -f manifest-tool ]; then
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
fi
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/node${NODEVERSION}_builder_ARCH:$semver --target flowdocker/node${NODEVERSION}_builder:$semver
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/node${NODEVERSION}_builder_ARCH:latest --target flowdocker/node${NODEVERSION}_builder:latest
"""
Expand Down Expand Up @@ -387,11 +393,13 @@ pipeline {
semver = VERSION.printable()
env.NODEVERSION = "20"
sh """
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
if ! [ -f manifest-tool ]; then
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
fi
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/node${NODEVERSION}_builder_ARCH:$semver --target flowdocker/node${NODEVERSION}_builder:$semver
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/node${NODEVERSION}_builder_ARCH:latest --target flowdocker/node${NODEVERSION}_builder:latest
"""
Expand Down Expand Up @@ -470,11 +478,13 @@ pipeline {
semver = VERSION.printable()
env.JAVAVERSION = "17"
sh """
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
if ! [ -f manifest-tool ]; then
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
fi
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/play-ARCH:$semver-java${JAVAVERSION} --target flowdocker/play:$semver-java${JAVAVERSION}
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/play-ARCH:latest-java${JAVAVERSION} --target flowdocker/play:latest-java${JAVAVERSION}
"""
Expand Down Expand Up @@ -592,11 +602,13 @@ pipeline {
semver = VERSION.printable()
env.JAVAVERSION = "17"
sh """
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
if ! [ -f manifest-tool ]; then
wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz
gunzip binaries-manifest-tool-2.0.8.tar.gz
tar -xvf binaries-manifest-tool-2.0.8.tar
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
fi
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/play_builder_ARCH:$semver-java${JAVAVERSION}-jammy --target flowdocker/play_builder:$semver-java${JAVAVERSION}-jammy
./manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template flowdocker/play_builder_ARCH:latest-java${JAVAVERSION}-jammy --target flowdocker/play_builder:latest-java${JAVAVERSION}-jammy
"""
Expand Down

0 comments on commit f7f41db

Please sign in to comment.