|
| 1 | +version: 0.2 |
| 2 | +# Runs Only the ESDK-NET v4.0.1 Decryption Vectors, testing Required EC CMM |
| 3 | + |
| 4 | +env: |
| 5 | + variables: |
| 6 | + TOXENV: "py311-full_decrypt-mpl" |
| 7 | + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >- |
| 8 | + arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f |
| 9 | + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >- |
| 10 | + arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2 |
| 11 | + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >- |
| 12 | + arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 |
| 13 | + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2: >- |
| 14 | + arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 |
| 15 | + git-credential-helper: yes |
| 16 | + secrets-manager: |
| 17 | + GITHUB_TOKEN: Github/lucasmcdonald3-fgpat:actions read |
| 18 | + |
| 19 | +phases: |
| 20 | + install: |
| 21 | + runtime-versions: |
| 22 | + python: 3.11 |
| 23 | + pre_build: |
| 24 | + commands: |
| 25 | + # Fetch test vectors from Dafny ESDK's most recent run |
| 26 | + # (Assuming the first result is most recent; seems to be correct...) |
| 27 | + - | |
| 28 | + MOST_RECENT_RUN_ID=$(curl -H "Accept: application/vnd.github+json" \ |
| 29 | + -H "Authorization: token ${GITHUB_TOKEN}" \ |
| 30 | + -H "X-GitHub-Api-Version: 2022-11-28" \ |
| 31 | + "https://api.github.com/repos/aws/aws-encryption-sdk-dafny/actions/runs?branch=mainline&status=completed&page=1&exclude_pull_requests=true" \ |
| 32 | + | jq 'first(.workflow_runs[] | select(.name=="Daily CI") | .id)') |
| 33 | + - | |
| 34 | + echo "DEBUG: Fetching artifact from run $MOST_RECENT_RUN_ID" |
| 35 | + - | |
| 36 | + MOST_RECENT_RUN_DOWNLOAD_URL=$(curl -H "Accept: application/vnd.github+json" \ |
| 37 | + -H "Authorization: token $GITHUB_TOKEN" \ |
| 38 | + -H "X-GitHub-Api-Version: 2022-11-28" \ |
| 39 | + "https://api.github.com/repos/aws/aws-encryption-sdk-dafny/actions/runs/$MOST_RECENT_RUN_ID/artifacts?name=ubuntu-latest_vector_artifact" \ |
| 40 | + | jq '.artifacts[0].archive_download_url') |
| 41 | + - | |
| 42 | + echo "DEBUG: Fetching artifact at $MOST_RECENT_RUN_DOWNLOAD_URL" |
| 43 | + - | |
| 44 | + curl -L -H "Accept: application/vnd.github+json" \ |
| 45 | + -H "Authorization: token $GITHUB_TOKEN" \ |
| 46 | + -H "X-GitHub-Api-Version: 2022-11-28" \ |
| 47 | + $(echo $MOST_RECENT_RUN_DOWNLOAD_URL | tr -d '"') -o ubuntu-latest_test_vector_artifact.zip |
| 48 | + # This unzips to `net41.zip`. |
| 49 | + - unzip ubuntu-latest_test_vector_artifact |
| 50 | + # This unzips to `net41/`. |
| 51 | + - unzip net41.zip -d net41 |
| 52 | + build: |
| 53 | + commands: |
| 54 | + - pip install "tox < 4.0" |
| 55 | + - cd test_vector_handlers |
| 56 | + - | |
| 57 | + tox -- \ |
| 58 | + --input ../net41/manifest.json \ |
| 59 | + --keyrings |
0 commit comments