@@ -624,76 +624,76 @@ jobs:
624624 --no-fail-on-empty-changeset \
625625 --role-arn ${{ matrix.cloudformation_execution_role }}
626626
627- # deploy-china-prod:
628- # needs: [load-matrices, deploy-china-gamma, package-china-prod]
629- # runs-on: ubuntu-24.04
630- # environment: prod
631- # strategy:
632- # matrix: ${{fromJSON(needs.load-matrices.outputs.china-prod)}}
633- # steps:
634- # - uses: actions/checkout@v4
635- # - uses: actions/setup-python@v4
636- # with:
637- # python-version: "3.13"
638- # - uses: aws-actions/setup-sam@v2
639- # with:
640- # use-installer: true
641- # token: ${{ secrets.GITHUB_TOKEN }}
642-
643- # - name: Assume the github runner role
644- # uses: aws-actions/configure-aws-credentials@v4
645- # with:
646- # aws-region: ${{ matrix.region }}
647- # role-to-assume: ${{ env.GITHUB_RUNNER_CHINA_ROLE }}
648- # audience: sts.amazonaws.com.cn
649-
650- # - name: Assume the china pipeline user role
651- # uses: aws-actions/configure-aws-credentials@v4
652- # with:
653- # aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
654- # aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
655- # aws-session-token: ${{ env.AWS_SESSION_TOKEN }}
656- # role-skip-session-tagging: true
657- # audience: sts.amazonaws.com.cn
658- # aws-region: ${{ matrix.region }}
659- # role-to-assume: ${{ matrix.pipeline_execution_role }}
660-
661- # - name: Add cargo pkg version to env vars
662- # run: |
663- # echo "CARGO_PKG_VERSION=$(cargo metadata --no-deps --format-version=1 | jq -r '.packages[0].version')" >> $GITHUB_ENV
664-
665- # - uses: actions/download-artifact@v4
666- # with:
667- # name: packaged-china-prod-x86_64-${{ matrix.region }}.yaml
668-
669- # - name: Deploy x86_64 Layer to all regions in china
670- # run: |
671- # sam deploy --stack-name lambda-adapter-prod-x86-${{ matrix.region }} \
672- # --template packaged-china-prod-x86_64-${{ matrix.region }}.yaml \
673- # --parameter-overrides CargoPkgVersion=${CARGO_PKG_VERSION} \
674- # --capabilities CAPABILITY_IAM \
675- # --region ${{ matrix.region }} \
676- # --s3-bucket ${{ matrix.artifacts_bucket }} \
677- # --image-repository ${{ matrix.image_repository }} \
678- # --no-fail-on-empty-changeset \
679- # --role-arn ${{ matrix.cloudformation_execution_role }}
680-
681- # - uses: actions/download-artifact@v4
682- # with:
683- # name: packaged-china-prod-arm64-${{ matrix.region }}.yaml
684-
685- # - name: Deploy arm64 Layer to supported china regions
686- # if: ${{ matrix.arm64_supported }}
687- # run: |
688- # sam deploy --stack-name lambda-adapter-prod-arm64-${{ matrix.region }} \
689- # --template packaged-china-prod-arm64-${{ matrix.region }}.yaml \
690- # --parameter-overrides CargoPkgVersion=${CARGO_PKG_VERSION} \
691- # --capabilities CAPABILITY_IAM \
692- # --region ${{ matrix.region }} \
693- # --s3-bucket ${{ matrix.artifacts_bucket }} \
694- # --image-repository ${{ matrix.image_repository }} \
695- # --no-fail-on-empty-changeset \
696- # --role-arn ${{ matrix.cloudformation_execution_role }}
627+ deploy-china-prod :
628+ needs : [load-matrices, deploy-china-gamma, package-china-prod]
629+ runs-on : ubuntu-24.04
630+ environment : prod
631+ strategy :
632+ matrix : ${{fromJSON(needs.load-matrices.outputs.china-prod)}}
633+ steps :
634+ - uses : actions/checkout@v4
635+ - uses : actions/setup-python@v4
636+ with :
637+ python-version : " 3.13"
638+ - uses : aws-actions/setup-sam@v2
639+ with :
640+ use-installer : true
641+ token : ${{ secrets.GITHUB_TOKEN }}
642+
643+ - name : Assume the github runner role
644+ uses : aws-actions/configure-aws-credentials@v4
645+ with :
646+ aws-region : ${{ matrix.region }}
647+ role-to-assume : ${{ env.GITHUB_RUNNER_CHINA_ROLE }}
648+ audience : sts.amazonaws.com.cn
649+
650+ - name : Assume the china pipeline user role
651+ uses : aws-actions/configure-aws-credentials@v4
652+ with :
653+ aws-access-key-id : ${{ env.AWS_ACCESS_KEY_ID }}
654+ aws-secret-access-key : ${{ env.AWS_SECRET_ACCESS_KEY }}
655+ aws-session-token : ${{ env.AWS_SESSION_TOKEN }}
656+ role-skip-session-tagging : true
657+ audience : sts.amazonaws.com.cn
658+ aws-region : ${{ matrix.region }}
659+ role-to-assume : ${{ matrix.pipeline_execution_role }}
660+
661+ - name : Add cargo pkg version to env vars
662+ run : |
663+ echo "CARGO_PKG_VERSION=$(cargo metadata --no-deps --format-version=1 | jq -r '.packages[0].version')" >> $GITHUB_ENV
664+
665+ - uses : actions/download-artifact@v4
666+ with :
667+ name : packaged-china-prod-x86_64-${{ matrix.region }}.yaml
668+
669+ - name : Deploy x86_64 Layer to all regions in china
670+ run : |
671+ sam deploy --stack-name lambda-adapter-prod-x86-${{ matrix.region }} \
672+ --template packaged-china-prod-x86_64-${{ matrix.region }}.yaml \
673+ --parameter-overrides CargoPkgVersion=${CARGO_PKG_VERSION} \
674+ --capabilities CAPABILITY_IAM \
675+ --region ${{ matrix.region }} \
676+ --s3-bucket ${{ matrix.artifacts_bucket }} \
677+ --image-repository ${{ matrix.image_repository }} \
678+ --no-fail-on-empty-changeset \
679+ --role-arn ${{ matrix.cloudformation_execution_role }}
680+
681+ - uses : actions/download-artifact@v4
682+ with :
683+ name : packaged-china-prod-arm64-${{ matrix.region }}.yaml
684+
685+ - name : Deploy arm64 Layer to supported china regions
686+ if : ${{ matrix.arm64_supported }}
687+ run : |
688+ sam deploy --stack-name lambda-adapter-prod-arm64-${{ matrix.region }} \
689+ --template packaged-china-prod-arm64-${{ matrix.region }}.yaml \
690+ --parameter-overrides CargoPkgVersion=${CARGO_PKG_VERSION} \
691+ --capabilities CAPABILITY_IAM \
692+ --region ${{ matrix.region }} \
693+ --s3-bucket ${{ matrix.artifacts_bucket }} \
694+ --image-repository ${{ matrix.image_repository }} \
695+ --no-fail-on-empty-changeset \
696+ --role-arn ${{ matrix.cloudformation_execution_role }}
697697
698698 publish-to-public-ecr :
699699 needs : [deploy-prod]
0 commit comments