diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..fb6989c8 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @awslabs/aws-lambda-adapter-maintainers \ No newline at end of file diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index a46ca256..228c4ae7 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -52,19 +52,18 @@ jobs: uses: actions/checkout@v3 - name: Install stable toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl + run: | + rustup target add x86_64-unknown-linux-musl + rustup target add aarch64-unknown-linux-musl - - uses: korandoru/setup-zig@v1 - with: - zig-version: 0.11.0 + - name: Install cargo lambda + run: pip3 install cargo-lambda - name: Configure cache uses: mozilla-actions/sccache-action@v0.0.3 - - uses: taiki-e/install-action@nextest + - name: Install cargo-nextest + run: cargo install cargo-nextest --locked - name: linting run: | @@ -88,26 +87,18 @@ jobs: - uses: aws-actions/setup-sam@v2 - name: Install stable toolchain - uses: dtolnay/rust-toolchain@stable - with: - targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl + run: | + rustup target add x86_64-unknown-linux-musl + rustup target add aarch64-unknown-linux-musl - - uses: korandoru/setup-zig@v1 - with: - zig-version: 0.11.0 + - name: Install cargo lambda + run: pip3 install cargo-lambda - name: Configure cache uses: mozilla-actions/sccache-action@v0.0.3 - - uses: taiki-e/install-action@nextest - - - name: Install Cargo Lambda - uses: jaxxstorm/action-install-gh-release@v1.9.0 - with: - repo: cargo-lambda/cargo-lambda - tag: v1.0.1 - platform: linux - arch: x86_64 + - name: Install cargo-nextest + run: cargo install cargo-nextest --locked - name: Add cargo pkg version to env vars run: | @@ -119,7 +110,7 @@ jobs: - name: Tar files run: tar -cvf build-x86_64.tar build-x86_64 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: aws-sam-build-x86_64 path: build-x86_64.tar @@ -130,7 +121,7 @@ jobs: - name: Tar files run: tar -cvf build-arm64.tar build-arm64 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: aws-sam-build-arm64 path: build-arm64.tar @@ -179,7 +170,7 @@ jobs: --region ${BETA_REGION} \ --output-template-file packaged-beta-x86_64.yaml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packaged-beta-x86_64.yaml path: packaged-beta-x86_64.yaml @@ -201,7 +192,7 @@ jobs: --region ${BETA_REGION} \ --output-template-file packaged-beta-arm64.yaml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packaged-beta-arm64.yaml path: packaged-beta-arm64.yaml @@ -294,19 +285,17 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Install stable toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - targets: x86_64-unknown-linux-musl + run: | + rustup target add x86_64-unknown-linux-musl - - uses: korandoru/setup-zig@v1 - with: - zig-version: 0.11.0 + - name: Install cargo lambda + run: pip3 install cargo-lambda - name: Configure cache uses: mozilla-actions/sccache-action@v0.0.3 - - uses: taiki-e/install-action@nextest + - name: Install cargo-nextest + run: cargo install cargo-nextest --locked - uses: actions/checkout@v3 @@ -344,12 +333,12 @@ jobs: --no-fail-on-empty-changeset \ --role-arn ${BETA_CLOUDFORMATION_EXECUTION_ROLE} - - uses: dkershner6/aws-ssm-getparameters-action@v1 - with: - parameterPairs: "/lambda-web-adapter/e2e/httpbin/zip/rest-api-endpoint = HTTPBIN_ZIP_REST_ENDPOINT, - /lambda-web-adapter/e2e/httpbin/zip/http-api-endpoint = HTTPBIN_ZIP_HTTP_ENDPOINT, - /lambda-web-adapter/e2e/httpbin/zip/alb-endpoint = HTTPBIN_ZIP_ALB_ENDPOINT, - /lambda-web-adapter/e2e/httpbin/zip/function-url = HTTPBIN_ZIP_FURL_ENDPOINT" + - name: retrive ssm parameters + run: | + export HTTPBIN_ZIP_REST_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/zip/rest-api-endpoint" --query "Parameter.Value" --output text) + export HTTPBIN_ZIP_HTTP_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/zip/http-api-endpoint" --query "Parameter.Value" --output text) + export HTTPBIN_ZIP_ALB_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/zip/alb-endpoint" --query "Parameter.Value" --output text) + export HTTPBIN_ZIP_FURL_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/zip/function-url" --query "Parameter.Value" --output text) - name: run e2e tests run: | @@ -365,19 +354,17 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Install stable toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - targets: x86_64-unknown-linux-musl + run: | + rustup target add x86_64-unknown-linux-musl - - uses: korandoru/setup-zig@v1 - with: - zig-version: 0.11.0 + - name: Install cargo lambda + run: pip3 install cargo-lambda - name: Configure cache uses: mozilla-actions/sccache-action@v0.0.3 - - uses: taiki-e/install-action@nextest + - name: Install cargo-nextest + run: cargo install cargo-nextest --locked - uses: actions/checkout@v3 @@ -416,12 +403,12 @@ jobs: --no-fail-on-empty-changeset \ --role-arn ${BETA_CLOUDFORMATION_EXECUTION_ROLE} - - uses: dkershner6/aws-ssm-getparameters-action@v1 - with: - parameterPairs: "/lambda-web-adapter/e2e/httpbin/oci/rest-api-endpoint = HTTPBIN_OCI_REST_ENDPOINT, - /lambda-web-adapter/e2e/httpbin/oci/http-api-endpoint = HTTPBIN_OCI_HTTP_ENDPOINT, - /lambda-web-adapter/e2e/httpbin/oci/alb-endpoint = HTTPBIN_OCI_ALB_ENDPOINT, - /lambda-web-adapter/e2e/httpbin/oci/function-url = HTTPBIN_OCI_FURL_ENDPOINT" + - name: retrive ssm parameters + run: | + export HTTPBIN_OCI_REST_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/oci/rest-api-endpoint" --query "Parameter.Value" --output text) + export HTTPBIN_OCI_HTTP_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/oci/http-api-endpoint" --query "Parameter.Value" --output text) + export HTTPBIN_OCI_ALB_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/oci/alb-endpoint" --query "Parameter.Value" --output text) + export HTTPBIN_OCI_FURL_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/oci/function-url" --query "Parameter.Value" --output text) - name: run e2e tests run: | @@ -522,7 +509,7 @@ jobs: --region ${{ matrix.region }} \ --output-template-file packaged-gamma-x86_64-${{ matrix.region }}.yaml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packaged-gamma-x86_64-${{ matrix.region }}.yaml path: packaged-gamma-x86_64-${{ matrix.region }}.yaml @@ -544,7 +531,7 @@ jobs: --region ${{ matrix.region }} \ --output-template-file packaged-gamma-arm64-${{ matrix.region }}.yaml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packaged-gamma-arm64-${{ matrix.region }}.yaml path: packaged-gamma-arm64-${{ matrix.region }}.yaml @@ -595,7 +582,7 @@ jobs: --region ${{ matrix.region }} \ --output-template-file packaged-prod-x86_64-${{ matrix.region }}.yaml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packaged-prod-x86_64-${{ matrix.region }}.yaml path: packaged-prod-x86_64-${{ matrix.region }}.yaml @@ -617,7 +604,7 @@ jobs: --region ${{ matrix.region }} \ --output-template-file packaged-prod-arm64-${{ matrix.region }}.yaml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packaged-prod-arm64-${{ matrix.region }}.yaml path: packaged-prod-arm64-${{ matrix.region }}.yaml @@ -670,7 +657,7 @@ jobs: --region ${{ matrix.region }} \ --output-template-file packaged-china-gamma-x86_64-${{ matrix.region }}.yaml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packaged-china-gamma-x86_64-${{ matrix.region }}.yaml path: packaged-china-gamma-x86_64-${{ matrix.region }}.yaml @@ -692,7 +679,7 @@ jobs: --region ${{ matrix.region }} \ --output-template-file packaged-china-gamma-arm64-${{ matrix.region }}.yaml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packaged-china-gamma-arm64-${{ matrix.region }}.yaml path: packaged-china-gamma-arm64-${{ matrix.region }}.yaml @@ -746,7 +733,7 @@ jobs: --region ${{ matrix.region }} \ --output-template-file packaged-china-prod-x86_64-${{ matrix.region }}.yaml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packaged-china-prod-x86_64-${{ matrix.region }}.yaml path: packaged-china-prod-x86_64-${{ matrix.region }}.yaml @@ -768,7 +755,7 @@ jobs: --region ${{ matrix.region }} \ --output-template-file packaged-china-prod-arm64-${{ matrix.region }}.yaml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packaged-china-prod-arm64-${{ matrix.region }}.yaml path: packaged-china-prod-arm64-${{ matrix.region }}.yaml