GeezerVison is showing github.com — chore: add build to support uploading artifacts (#379) · aws/aws-encryption-sdk-java@69e7914
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: codebuild/release/release.yml +12-1Lines changed: 12 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -111,12 +111,23 @@ batch: |
111 | 111 | JAVA_NUMERIC_VERSION: 11 |
112 | 112 | image: aws/codebuild/amazonlinux2-x86_64-standard:3.0 |
113 | 113 |
|
114 | | - - identifier: update_javadoc |
| 114 | +# Upload Artifacts |
| 115 | + - identifier: upload_artifacts |
115 | 116 | depend-on: |
116 | 117 | - validate_prod_release_openjdk8 |
117 | 118 | - validate_prod_release_openjdk11 |
118 | 119 | - validate_prod_release_corretto8 |
119 | 120 | - 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 |
120 | 131 | buildspec: codebuild/release/javadoc.yml |
121 | 132 | env: |
122 | 133 | variables: |
|
Collapse file
Copy file name to clipboard +40Lines changed: 40 additions & 0 deletions | 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 |