From 2007202c03b0d5885603a7cd343c706b53238960 Mon Sep 17 00:00:00 2001 From: seebees Date: Wed, 11 Nov 2020 21:00:09 -0800 Subject: [PATCH 1/2] chore: Add AWS CodeBuild buildspec Adding buildspec to batch build multiple JDK environments * corretto8 * corretto11 * openjdk8 * openjdk11 --- buildspec.yml | 25 +++++++++++++++++++++++++ codebuild/corretto11.yml | 9 +++++++++ codebuild/corretto8.yml | 9 +++++++++ codebuild/openjdk11.yml | 9 +++++++++ codebuild/openjdk8.yml | 9 +++++++++ 5 files changed, 61 insertions(+) create mode 100644 buildspec.yml create mode 100644 codebuild/corretto11.yml create mode 100644 codebuild/corretto8.yml create mode 100644 codebuild/openjdk11.yml create mode 100644 codebuild/openjdk8.yml diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 00000000..365eb003 --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,25 @@ +version: 0.2 + +batch: + fast-fail: false + build-list: + - identifier: openjdk8 + buildspec: codebuild/openjdk8.yml + env: + env: + image: aws/codebuild/standard:3.0 + - identifier: openjdk11 + buildspec: codebuild/openjdk11.yml + env: + env: + image: aws/codebuild/standard:3.0 + - identifier: corretto8 + buildspec: codebuild/corretto8.yml + env: + env: + image: aws/codebuild/amazonlinux2-x86_64-standard:3.0 + - identifier: corretto11 + buildspec: codebuild/corretto11.yml + env: + env: + image: aws/codebuild/amazonlinux2-x86_64-standard:3.0 diff --git a/codebuild/corretto11.yml b/codebuild/corretto11.yml new file mode 100644 index 00000000..9ce4b67a --- /dev/null +++ b/codebuild/corretto11.yml @@ -0,0 +1,9 @@ +version: 0.2 + +phases: + install: + runtime-versions: + java: corretto11 + build: + commands: + - mvn install \ No newline at end of file diff --git a/codebuild/corretto8.yml b/codebuild/corretto8.yml new file mode 100644 index 00000000..a1303e34 --- /dev/null +++ b/codebuild/corretto8.yml @@ -0,0 +1,9 @@ +version: 0.2 + +phases: + install: + runtime-versions: + java: corretto8 + build: + commands: + - mvn install \ No newline at end of file diff --git a/codebuild/openjdk11.yml b/codebuild/openjdk11.yml new file mode 100644 index 00000000..854e294c --- /dev/null +++ b/codebuild/openjdk11.yml @@ -0,0 +1,9 @@ +version: 0.2 + +phases: + install: + runtime-versions: + java: openjdk11 + build: + commands: + - mvn install \ No newline at end of file diff --git a/codebuild/openjdk8.yml b/codebuild/openjdk8.yml new file mode 100644 index 00000000..1a1553ea --- /dev/null +++ b/codebuild/openjdk8.yml @@ -0,0 +1,9 @@ +version: 0.2 + +phases: + install: + runtime-versions: + java: openjdk8 + build: + commands: + - mvn install \ No newline at end of file From fc3af3b8b3085bde7a8d96e7f7e9d4f8608a9d77 Mon Sep 17 00:00:00 2001 From: seebees Date: Mon, 21 Dec 2020 11:28:12 -0800 Subject: [PATCH 2/2] chore: add codecov script Remove the Codecov upload from Travis, and add it to CodeBuild. It needs to be in a separate script because of the way that CodeBuild parses YAML. The `(` breaks the parser and gives `Syntax error: "(" unexpected` --- .travis.yml | 4 +--- codebuild/codecov.sh | 3 +++ codebuild/corretto11.yml | 9 ++++++++- codebuild/corretto8.yml | 9 ++++++++- codebuild/openjdk11.yml | 9 ++++++++- codebuild/openjdk8.yml | 9 ++++++++- 6 files changed, 36 insertions(+), 7 deletions(-) create mode 100755 codebuild/codecov.sh diff --git a/.travis.yml b/.travis.yml index e02a7abe..ebeab86d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,4 @@ jdk: - openjdk11 install: /bin/true script: mvn install --quiet -after_success: - # https://docs.codecov.io/docs/about-the-codecov-bash-uploader - - bash <(curl -s https://codecov.io/bash) + diff --git a/codebuild/codecov.sh b/codebuild/codecov.sh new file mode 100755 index 00000000..735e948a --- /dev/null +++ b/codebuild/codecov.sh @@ -0,0 +1,3 @@ +#/bin/bash +# https://docs.codecov.io/docs/about-the-codecov-bash-uploader +bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN diff --git a/codebuild/corretto11.yml b/codebuild/corretto11.yml index 9ce4b67a..2164cb5e 100644 --- a/codebuild/corretto11.yml +++ b/codebuild/corretto11.yml @@ -1,9 +1,16 @@ version: 0.2 +env: + secrets-manager: + CODECOV_TOKEN: "codecov/token/aws/aws-dynamodb-encryption-java:CODECOV_TOKEN" + phases: install: runtime-versions: java: corretto11 build: commands: - - mvn install \ No newline at end of file + - mvn install + post_build: + commands: + - bash codebuild/codecov.sh diff --git a/codebuild/corretto8.yml b/codebuild/corretto8.yml index a1303e34..4db077c4 100644 --- a/codebuild/corretto8.yml +++ b/codebuild/corretto8.yml @@ -1,9 +1,16 @@ version: 0.2 +env: + secrets-manager: + CODECOV_TOKEN: "codecov/token/aws/aws-dynamodb-encryption-java:CODECOV_TOKEN" + phases: install: runtime-versions: java: corretto8 build: commands: - - mvn install \ No newline at end of file + - mvn install + post_build: + commands: + - bash codebuild/codecov.sh diff --git a/codebuild/openjdk11.yml b/codebuild/openjdk11.yml index 854e294c..a2147466 100644 --- a/codebuild/openjdk11.yml +++ b/codebuild/openjdk11.yml @@ -1,9 +1,16 @@ version: 0.2 +env: + secrets-manager: + CODECOV_TOKEN: "codecov/token/aws/aws-dynamodb-encryption-java:CODECOV_TOKEN" + phases: install: runtime-versions: java: openjdk11 build: commands: - - mvn install \ No newline at end of file + - mvn install + post_build: + commands: + - bash codebuild/codecov.sh diff --git a/codebuild/openjdk8.yml b/codebuild/openjdk8.yml index 1a1553ea..c06f5c29 100644 --- a/codebuild/openjdk8.yml +++ b/codebuild/openjdk8.yml @@ -1,9 +1,16 @@ version: 0.2 +env: + secrets-manager: + CODECOV_TOKEN: "codecov/token/aws/aws-dynamodb-encryption-java:CODECOV_TOKEN" + phases: install: runtime-versions: java: openjdk8 build: commands: - - mvn install \ No newline at end of file + - mvn install + post_build: + commands: + - bash codebuild/codecov.sh