-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into locale-fix
- Loading branch information
Showing
100 changed files
with
7,815 additions
and
882 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule aws-encryption-sdk-specification
updated
93 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
java: $JAVA_ENV_VERSION | ||
commands: | ||
- n 16 | ||
# Install the Javascript ESDK run test vectors | ||
- npm install -g @aws-crypto/integration-node | ||
|
||
- git submodule update --init submodules/MaterialProviders | ||
# Get Dafny | ||
- curl https://github.com/dafny-lang/dafny/releases/download/v4.2.0/dafny-4.2.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" | ||
pre_build: | ||
commands: | ||
# Assume Role to access non-prod resources | ||
- TMP_ROLE=$(aws sts assume-role --role-arn "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Java-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 and deploy to maven local | ||
- cd submodules/MaterialProviders | ||
- git checkout $BRANCH | ||
- cd TestVectorsAwsCryptographicMaterialProviders/ | ||
# This works because `node` is installed by default on GHA runners | ||
- CORES=$(node -e 'console.log(os.cpus().length)') | ||
- make build_java CORES=$CORES | ||
- ./runtimes/java/gradlew -p runtimes/java publishMavenLocalPublicationToMavenLocal | ||
- cd $CODEBUILD_SRC_DIR | ||
build: | ||
commands: | ||
- export VECTORS_ZIP="$CODEBUILD_SRC_DIR/generated_vectors.zip" | ||
# Generate test vectors by encrypting with Keyrings | ||
# Ignore Testing coverage requirement by skipping jacoco | ||
- mvn -B -ntp install -Dgpg.skip=true -Djacoco.skip=true "-Dtest=TestVectorGenerator" "-DzipFilePath=$VECTORS_ZIP" "-DkeysManifest=$CODEBUILD_SRC_DIR/src/test/resources/keys.json" | ||
# Decrypt generated vectors with Javascript ESDK | ||
- integration-node decrypt -v $VECTORS_ZIP | ||
|
||
- rm $VECTORS_ZIP | ||
# Generate test vectors by encrypting with MasterKeys | ||
- mvn -B -ntp install -Dgpg.skip=true -Djacoco.skip=true -Dmasterkey=true "-Dtest=TestVectorGenerator" "-DzipFilePath=$VECTORS_ZIP" "-DkeysManifest=$CODEBUILD_SRC_DIR/src/test/resources/keys.json" | ||
# Decrypt generated vectors with Javascript ESDK | ||
- integration-node decrypt -v $VECTORS_ZIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.