diff --git a/buildspec-ci.yml b/buildspec-ci.yml index b8c533e48..c9cff6925 100644 --- a/buildspec-ci.yml +++ b/buildspec-ci.yml @@ -7,10 +7,12 @@ phases: - aws --version - $(aws ecr get-login --region eu-central-1 --no-include-email) - REPOSITORY_URI=348099934012.dkr.ecr.eu-central-1.amazonaws.com/kilt/prototype-chain - - 'IMAGE_TAG=$(sed -n ''s/version = "\(.*\)"$/\1/p'' Cargo.toml)' + - IMAGE_TAG=$(cat Cargo.toml | grep version | head -1 | sed 's/[",]//g' | cut -d "=" -f2 | tr -d '[[:space:]]') - docker pull $REPOSITORY_URI:latest || true build: commands: - echo Run 'build / test' + - echo "REPOSITORY_URI=$REPOSITORY_URI" + - echo "IMAGE_TAG=$IMAGE_TAG" - docker build --cache-from $REPOSITORY_URI:latest -t $REPOSITORY_URI:$IMAGE_TAG . - echo 'build / test' successful! diff --git a/buildspec.yml b/buildspec.yml index eacbb9658..8105de0cc 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -7,7 +7,7 @@ phases: - aws --version - $(aws ecr get-login --region eu-central-1 --no-include-email) - REPOSITORY_URI=348099934012.dkr.ecr.eu-central-1.amazonaws.com/kilt/prototype-chain - - 'IMAGE_TAG=$(sed -n ''s/version = "\(.*\)"$/\1/p'' Cargo.toml)' + - IMAGE_TAG=$(cat Cargo.toml | grep version | head -1 | sed 's/[",]//g' | cut -d "=" -f2 | tr -d '[[:space:]]') - docker pull $REPOSITORY_URI:latest || true build: commands: