Skip to content

Commit

Permalink
check before building and pushing an existing image in benchmark flow (
Browse files Browse the repository at this point in the history
  • Loading branch information
itaiad200 committed Nov 29, 2020
1 parent b8bdcc0 commit fdd0ca1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,15 @@ jobs:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY_BENCHMARK_EXECUTOR: benchmark-executor
run: |
docker build --target benchmark-executor -t $ECR_REGISTRY/$ECR_REPOSITORY_BENCHMARK_EXECUTOR:${{ steps.version.outputs.tag }} --build-arg VERSION=${{ steps.version.outputs.tag }} .
docker push $ECR_REGISTRY/$ECR_REPOSITORY_BENCHMARK_EXECUTOR:${{ steps.version.outputs.tag }}
set +e
describe_image="$( aws ecr describe-images --repository-name $ECR_REGISTRY --image-ids imageTag=${{ steps.version.outputs.tag }})"
if [ $? -eq 0 ]; then
echo "Image exists"
else
echo "Image doesn't exist"
docker build --target benchmark-executor -t $ECR_REGISTRY/$ECR_REPOSITORY_BENCHMARK_EXECUTOR:${{ steps.version.outputs.tag }} --build-arg VERSION=${{ steps.version.outputs.tag }} .
docker push $ECR_REGISTRY/$ECR_REPOSITORY_BENCHMARK_EXECUTOR:${{ steps.version.outputs.tag }}
fi
benchmark-system:
name: Measure system benchmark
Expand Down

0 comments on commit fdd0ca1

Please sign in to comment.