From 172922160eda09dd4483dab5120c04ce05337119 Mon Sep 17 00:00:00 2001 From: Oleh Nikolaiev Date: Thu, 28 May 2020 16:11:49 +0300 Subject: [PATCH 1/2] SKALE-2202 fix building and publishing containers --- .github/workflows/dockerimage.yml | 4 ++-- .github/workflows/dockerimagebase.yml | 4 ++-- .github/workflows/dockerimagesim.yml | 4 ++-- scripts/build_image.sh | 3 ++- scripts/publish_image.sh | 3 +-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index ae7f5779..063d7ff2 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -28,5 +28,5 @@ jobs: echo "Version $VERSION" export RELEASE=true echo "::set-env name=RELEASE::$RELEASE" - bash ./scripts/build_image.sh Dockerfile - bash ./scripts/publish_image.sh Dockerfile sgxwallet \ No newline at end of file + bash ./scripts/build_image.sh Dockerfile sgxwallet + bash ./scripts/publish_image.sh sgxwallet \ No newline at end of file diff --git a/.github/workflows/dockerimagebase.yml b/.github/workflows/dockerimagebase.yml index 3da05c5d..ca498496 100644 --- a/.github/workflows/dockerimagebase.yml +++ b/.github/workflows/dockerimagebase.yml @@ -31,5 +31,5 @@ jobs: echo "Version $VERSION" export RELEASE=true echo "::set-env name=RELEASE::$RELEASE" - bash ./scripts/build_image.sh DockerfileBase - bash ./scripts/publish_image.sh DockerfileBase sgxwallet_base \ No newline at end of file + bash ./scripts/build_image.sh DockerfileBase sgxwallet_base + bash ./scripts/publish_image.sh sgxwallet_base \ No newline at end of file diff --git a/.github/workflows/dockerimagesim.yml b/.github/workflows/dockerimagesim.yml index dd452b09..efe70593 100644 --- a/.github/workflows/dockerimagesim.yml +++ b/.github/workflows/dockerimagesim.yml @@ -26,7 +26,7 @@ jobs: export VERSION=$(bash ./scripts/calculate_version.sh $BRANCH $VERSION) echo "::set-env name=VERSION::$VERSION" echo "Version $VERSION" - bash ./scripts/build_image.sh DockerfileSimulation + bash ./scripts/build_image.sh DockerfileSimulation sgxwallet_sim - name: build container for testing run: python3 scripts/docker_build.py DockerfileSimulation sgxwalletsim ${GITHUB_SHA} - name: test @@ -41,7 +41,7 @@ jobs: echo "Version $VERSION" export RELEASE=true echo "::set-env name=RELEASE::$RELEASE" - bash ./scripts/publish_image.sh DockerfileSimulation sgxwalletsim + bash ./scripts/publish_image.sh sgxwalletsim - name: Create Release if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable') id: create_release diff --git a/scripts/build_image.sh b/scripts/build_image.sh index 5fdb6acd..274d6d3c 100644 --- a/scripts/build_image.sh +++ b/scripts/build_image.sh @@ -3,13 +3,14 @@ set -e DOCKERFILE=$1 +CONTAINER_NAME=$2 : "${VERSION?Need to set VERSION}" : "${BRANCH?Need to set BRANCH}" NAME=sgx REPO_NAME=skalenetwork/$NAME -IMAGE_NAME=$REPO_NAME:$VERSION +IMAGE_NAME=$REPO_NAME.$CONTAINER_NAME:$VERSION LATEST_IMAGE_NAME=$REPO_NAME:$BRANCH-latest DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" diff --git a/scripts/publish_image.sh b/scripts/publish_image.sh index 11a6166f..c262734e 100755 --- a/scripts/publish_image.sh +++ b/scripts/publish_image.sh @@ -2,8 +2,7 @@ set -e -DOCKERFILE=$1 -CONTAINER_NAME=$2 +CONTAINER_NAME=$1 : "${VERSION?Need to set VERSION}" : "${BRANCH?Need to set BRANCH}" From 0eff598bc95222f9382c0f87cbc71372be0ae6b0 Mon Sep 17 00:00:00 2001 From: Oleh Nikolaiev Date: Thu, 28 May 2020 16:25:51 +0300 Subject: [PATCH 2/2] SKALE-2202 fix container name --- .github/workflows/dockerimagesim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerimagesim.yml b/.github/workflows/dockerimagesim.yml index efe70593..da7d9f62 100644 --- a/.github/workflows/dockerimagesim.yml +++ b/.github/workflows/dockerimagesim.yml @@ -41,7 +41,7 @@ jobs: echo "Version $VERSION" export RELEASE=true echo "::set-env name=RELEASE::$RELEASE" - bash ./scripts/publish_image.sh sgxwalletsim + bash ./scripts/publish_image.sh sgxwallet_sim - name: Create Release if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable') id: create_release