-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Michael Graeb <graebm@amazon.com>
- Loading branch information
Showing
25 changed files
with
305 additions
and
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
import Builder | ||
import os | ||
import argparse | ||
|
||
|
||
class AWSCrtJavaBuild(Builder.Action): | ||
|
||
def run(self, env): | ||
if os.getenv("CRT_FIPS") is not None: | ||
env.shell.exec("mvn", "-P", "continuous-integration", "-B", "compile", | ||
"-Dcmake.crt_fips=ON", check=True) | ||
else: | ||
env.shell.exec("mvn", "-P", "continuous-integration", | ||
"-B", "compile", check=True) | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument('--classifier') | ||
args = parser.parse_known_args(env.args.args)[0] | ||
if args.classifier: | ||
env.shell.exec("mvn", "-B", "install", "-DskipTests", "-Dshared-lib.skip=true", | ||
f"-Dcrt.classifier={args.classifier}", check=True) |
This file was deleted.
Oops, something went wrong.
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
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,33 @@ | ||
version: 0.2 | ||
#this buildspec assumes the aws-common-runtime/ubuntu-16.04 image | ||
# This job is responsible for artifacting the JAR which will have all of the other shared libs stuffed | ||
# into it once all platforms are built and artifacted | ||
phases: | ||
install: | ||
commands: | ||
- sudo add-apt-repository ppa:openjdk-r/ppa | ||
- sudo apt-get update -y | ||
- sudo apt-get install openjdk-11-jdk-headless maven wget unzip -y -f | ||
build: | ||
commands: | ||
- cd $CODEBUILD_SRC_DIR/aws-crt-java | ||
# upload artifacts to S3 | ||
- export GIT_TAG=$(git describe --tags) | ||
- mkdir -p target/cmake-build/lib | ||
# prepare fips-compat uber jar, download the regular libs | ||
- aws s3 cp --recursive s3://aws-crt-java-pipeline/${GIT_TAG}/lib $CODEBUILD_SRC_DIR/aws-crt-java/target/cmake-build/lib | ||
# Override with the FIPS libs | ||
- aws s3 cp --recursive s3://aws-crt-java-pipeline/${GIT_TAG}/fips_lib $CODEBUILD_SRC_DIR/aws-crt-java/target/cmake-build/lib | ||
# Run a test to make sure we get the FIPS libs | ||
- CRT_FIPS=ON mvn test -Dtest=software.amazon.awssdk.crt.test.SystemInfoTest#testIsFIPS -Dshared-lib.skip=true | ||
- mvn -B package -DskipTests -Dshared-lib.skip=true -Dcrt.classifier=fips-compat | ||
|
||
post_build: | ||
commands: | ||
# upload artifacts to S3 | ||
- export GIT_TAG=$(git describe --tags) | ||
- aws s3 cp --recursive --exclude "*" --include "aws-crt*.jar" ./target s3://aws-crt-java-pipeline/${GIT_TAG}/jar | ||
|
||
cache: | ||
paths: | ||
- "/root/.m2/**/*" |
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,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
cd $(dirname $0)/../.. | ||
|
||
git submodule update --init | ||
# double check aws-lc is the FIPS approved branch. | ||
bash ./codebuild/cd/test-fips-branch.sh | ||
|
||
# Pry the builder version this CRT is using out of ci.yml | ||
BUILDER_VERSION=$(cat .github/workflows/ci.yml | grep 'BUILDER_VERSION:' | sed 's/\s*BUILDER_VERSION:\s*\(.*\)/\1/') | ||
echo "Using builder version ${BUILDER_VERSION}" | ||
|
||
aws s3 cp s3://aws-crt-builder/releases/${BUILDER_VERSION}/builder.pyz ./builder | ||
chmod a+x builder | ||
|
||
GIT_TAG=$(git describe --tags) | ||
|
||
./builder build -p aws-crt-java run_tests=false --target=linux-arm64 --cmake-extra=-DCRT_FIPS=ON | ||
mv target/cmake-build/aws-crt-java/* target/cmake-build/ | ||
|
||
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn -B package -DskipTests -Dshared-lib.skip=true -Dcrt.classifier=linux-aarch_64-fips | ||
|
||
aws s3 cp --recursive --include "*.so" target/cmake-build/lib s3://aws-crt-java-pipeline/${GIT_TAG}/fips_lib |
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.