diff --git a/.github/workflows/aws-deploy.yml b/.github/workflows/aws-deploy.yml index d4a3f06aa2..e803455204 100644 --- a/.github/workflows/aws-deploy.yml +++ b/.github/workflows/aws-deploy.yml @@ -27,6 +27,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: AWS Authentication env: AWS_MFA_ARN: ${{ secrets.RESTRICTED_AWS_MFA_ARN }} @@ -68,6 +77,15 @@ jobs: export AWS_SECRET_ACCESS_KEY=$(cat /tmp/creds_json | jq .Credentials.SecretAccessKey| tr -d '"') export AWS_SESSION_TOKEN=$(cat /tmp/creds_json | jq .Credentials.SessionToken|tr -d '"') sls deploy --force - - - + - name: Remove the cron job scheduler in staging (eu-west-1) + if: "${{ inputs.region == 'eu-west-1' }}" + run: | + export AWS_ACCESS_KEY_ID=$(cat /tmp/creds_json | jq .Credentials.AccessKeyId |tr -d '"') + export AWS_SECRET_ACCESS_KEY=$(cat /tmp/creds_json | jq .Credentials.SecretAccessKey| tr -d '"') + export AWS_SESSION_TOKEN=$(cat /tmp/creds_json | jq .Credentials.SessionToken|tr -d '"') + RULE_NAME=$(aws events list-rule-names-by-target --target-arn arn:aws:lambda:${{ inputs.region }}:${{ secrets.AWS_ACCOUNT_ID }}:function:lambda-perf-dev-functionTriggerDeployerRs --region ${{ inputs.region }} | jq -r '.RuleNames[0]') + echo "Disabling rule ${RULE_NAME}" + aws events disable-rule --name $RULE_NAME --region ${{ inputs.region }} + RULE_NAME=$(aws events list-rule-names-by-target --target-arn arn:aws:lambda:${{ inputs.region }}:${{ secrets.AWS_ACCOUNT_ID }}:function:lambda-perf-dev-resultBuilder --region ${{ inputs.region }} | jq -r '.RuleNames[0]') + echo "Disabling rule ${RULE_NAME}" + aws events disable-rule --name $RULE_NAME --region ${{ inputs.region }} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 30e28c18c5..5485955c52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,4 @@ [workspace] - members = [ "function-trigger-deployer-rs", "function-deployer-rs", @@ -7,6 +6,7 @@ members = [ "function-report-log-processor-rs", "common_lib" ] +resolver = "2" [profile.release] opt-level = 'z' diff --git a/serverless.yaml b/serverless.yaml index 28eb995421..25eb584a84 100644 --- a/serverless.yaml +++ b/serverless.yaml @@ -12,6 +12,7 @@ provider: role: name: lambda-perf-${sls:stage}-role-${aws:region} timeout: 900 + logRetentionInDays: 7 iamRoleStatements: - Effect: Allow Action: "logs:CreateLogGroup"