File tree Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Original file line number Diff line number Diff line change @@ -111,12 +111,23 @@ batch:
111111 JAVA_NUMERIC_VERSION : 11
112112 image : aws/codebuild/amazonlinux2-x86_64-standard:3.0
113113
114- - identifier : update_javadoc
114+ # Upload Artifacts
115+ - identifier : upload_artifacts
115116 depend-on :
116117 - validate_prod_release_openjdk8
117118 - validate_prod_release_openjdk11
118119 - validate_prod_release_corretto8
119120 - validate_prod_release_corretto11
121+ buildspec : codebuild/release/upload_artifacts.yml
122+ env :
123+ # Changing to standard:5.0 because we are able to install gh cli on ubuntu but
124+ # not on AmazonLinux
125+ image : aws/codebuild/standard:5.0
126+
127+ # Generate and update new javadocs
128+ - identifier : update_javadoc
129+ depend-on :
130+ - upload_artifacts
120131 buildspec : codebuild/release/javadoc.yml
121132 env :
122133 variables :
Original file line number Diff line number Diff line change 1+ # # Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+ # # SPDX-License-Identifier: Apache-2.0
3+
4+ version : 0.2
5+
6+ env :
7+ variables :
8+ BRANCH : " master"
9+ git-credential-helper : yes
10+ secrets-manager :
11+ GH_TOKEN : Github/aws-crypto-tools-ci-bot:personal\ access\ token
12+
13+ phases :
14+ pre_build :
15+ commands :
16+ # get new project version
17+ - export VERSION=$(grep version pom.xml | head -n 1 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')
18+ # install gh cli in order to upload artifacts
19+ - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
20+ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
21+ - apt update
22+ - apt install gh
23+ - git checkout $BRANCH
24+ build :
25+ commands :
26+ - gh version
27+ - gh auth login --with-token < $GH_TOKEN
28+ - |
29+ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \
30+ -DrepoUrl=https://aws.oss.sonatype.org \
31+ -Dartifact=com.amazonaws:aws-encryption-sdk-java:${VERSION}:jar
32+ - |
33+ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \
34+ -DrepoUrl=https://aws.oss.sonatype.org \
35+ -Dartifact=com.amazonaws:aws-encryption-sdk-java:${VERSION}:jar:sources
36+ - |
37+ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \
38+ -DrepoUrl=https://aws.oss.sonatype.org \
39+ -Dartifact=com.amazonaws:aws-encryption-sdk-java:${VERSION}:jar:javadoc
40+ - gh release upload v${VERSION} ~/.m2/repository/com/amazonaws/aws-encryption-sdk-java/${VERSION}/*.jar
You can’t perform that action at this time.
0 commit comments