## Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. ## SPDX-License-Identifier: Apache-2.0 version: 0.2 env: variables: REGION: us-east-1 DOMAIN: crypto-tools-internal REPOSITORY: java-mpl-staging parameter-store: ACCOUNT: /CodeBuild/AccountId phases: install: runtime-versions: java: $JAVA_ENV_VERSION commands: - cd .. # Get Dafny - curl https://github.com/dafny-lang/dafny/releases/download/v4.1.0/dafny-4.1.0-x64-ubuntu-20.04.zip -L -o dafny.zip - unzip -qq dafny.zip && rm dafny.zip - export PATH="$PWD/dafny:$PATH" # Get Gradle 7.6 - curl https://services.gradle.org/distributions/gradle-7.6-all.zip -L -o gradle.zip - unzip -qq gradle.zip && rm gradle.zip - export PATH="$PWD/gradle-7.6/bin:$PATH" - cd aws-cryptographic-material-providers-library-java/ pre_build: commands: # Get CI Creds to be able to call MPL TestVectors - TMP_ROLE=$(aws sts assume-role --role-arn "arn:aws:iam::370957321024:role/GitHub-CI-MPL-Dafny-Role-us-west-2" --role-session-name "CB-TestVectorResources") - export TMP_ROLE - export AWS_ACCESS_KEY_ID=$(echo "${TMP_ROLE}" | jq -r '.Credentials.AccessKeyId') - export AWS_SECRET_ACCESS_KEY=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SecretAccessKey') - export AWS_SESSION_TOKEN=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SessionToken') - aws sts get-caller-identity build: commands: # Since no CA creds were exported the jar will not be pulled down from CA. # In order, gradle will look for the defined dependencies in: # - Maven Central # - Maven Local # - AWS CodeArtifact - cd TestVectorsAwsCryptographicMaterialProviders/ # transpile the code only for this project - make transpile_implementation_java - make transpile_test_java - make test_java