From 4734881381fb480ca999296a33598e2d6065934c Mon Sep 17 00:00:00 2001 From: bensteinberg Date: Wed, 31 Jul 2024 12:59:34 -0400 Subject: [PATCH 1/2] Uncomment pandoc-lambda build --- .github/workflows/tests.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5851911fc..1afa208c1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,24 +58,24 @@ jobs: # this requires that AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, # and AWS_ACCOUNT_ID be set. # TODO: this could potentially use existing built image - # - name: Publish pandoc-lambda image - # if: github.event_name == 'push' && github.ref == 'refs/heads/develop' && contains(steps.rebuild.outputs.services-rebuilt, 'pandoc-lambda') - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} - # AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} - # run: | - # aws --version - # cd docker/pandoc-lambda/ - # IMG=pandoc-lambda - # TAG=`git rev-parse --short HEAD` - # ACCT=${AWS_ACCOUNT_ID} - # REGION=${AWS_DEFAULT_REGION} - # ARN=arn:aws:lambda:${REGION}:${ACCT}:function:h2o-export-stage - # aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin ${ACCT}.dkr.ecr.${REGION}.amazonaws.com - # docker buildx build --push --platform linux/amd64 --tag ${ACCT}.dkr.ecr.${REGION}.amazonaws.com/${IMG}:${TAG} . - # aws lambda update-function-code --function-name ${ARN} --image-uri ${ACCT}.dkr.ecr.${REGION}.amazonaws.com/${IMG}:${TAG} --region ${REGION} + - name: Publish pandoc-lambda image + if: github.event_name == 'push' && github.ref == 'refs/heads/develop' && contains(steps.rebuild.outputs.services-rebuilt, 'pandoc-lambda') + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} + run: | + aws --version + cd docker/pandoc-lambda/ + IMG=pandoc-lambda + TAG=`git rev-parse --short HEAD` + ACCT=${AWS_ACCOUNT_ID} + REGION=${AWS_DEFAULT_REGION} + ARN=arn:aws:lambda:${REGION}:${ACCT}:function:h2o-export-stage + aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin ${ACCT}.dkr.ecr.${REGION}.amazonaws.com + docker buildx build --push --platform linux/amd64 --tag ${ACCT}.dkr.ecr.${REGION}.amazonaws.com/${IMG}:${TAG} . + aws lambda update-function-code --function-name ${ARN} --image-uri ${ACCT}.dkr.ecr.${REGION}.amazonaws.com/${IMG}:${TAG} --region ${REGION} # Commit built assets if necessary, then deploy via Salt reactor - name: Deploy From aeb9b525316f82b8b1b44776470b6a6051169554 Mon Sep 17 00:00:00 2001 From: bensteinberg Date: Wed, 31 Jul 2024 13:00:41 -0400 Subject: [PATCH 2/2] Try --provenance=false --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1afa208c1..0328a8106 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -74,7 +74,7 @@ jobs: REGION=${AWS_DEFAULT_REGION} ARN=arn:aws:lambda:${REGION}:${ACCT}:function:h2o-export-stage aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin ${ACCT}.dkr.ecr.${REGION}.amazonaws.com - docker buildx build --push --platform linux/amd64 --tag ${ACCT}.dkr.ecr.${REGION}.amazonaws.com/${IMG}:${TAG} . + docker buildx build --push --provenance=false --platform linux/amd64 --tag ${ACCT}.dkr.ecr.${REGION}.amazonaws.com/${IMG}:${TAG} . aws lambda update-function-code --function-name ${ARN} --image-uri ${ACCT}.dkr.ecr.${REGION}.amazonaws.com/${IMG}:${TAG} --region ${REGION} # Commit built assets if necessary, then deploy via Salt reactor