forked from playframework/play1
-
Notifications
You must be signed in to change notification settings - Fork 0
build: migrate repository to use CodeArtifact in build and publish #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1f50fcb
build: migrate repository to use CodeArtifact in build and publish
welociraptor 5fa108b
ci: read codeartifact credentials from gradle.properties
welociraptor bb5ad4a
fix: missing end quotes
welociraptor 6a40389
ci: pin third party actions versions
welociraptor 2aad4af
fix: remaining maven repository configuration block
welociraptor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,48 @@ | ||
| name: Publish to CodeArtifact | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| env: | ||
| AWS_REGION: us-east-1 | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: | ||
| group: Infrastructure | ||
| labels: [self-hosted, linux, arm64] | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Set up JDK | ||
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'corretto' | ||
|
|
||
| - name: Login to CodeArtifact | ||
| run: | | ||
| export CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token \ | ||
| --domain ${{ vars.CODEARTIFACT_DOMAIN }} \ | ||
| --domain-owner ${{ vars.CODEARTIFACT_DOMAIN_OWNER }} \ | ||
| --region ${{ env.AWS_REGION }} \ | ||
| --query authorizationToken \ | ||
| --output text) | ||
| cat <<EOS > gradle.properties | ||
| mavenUrl=${{ vars.CODEARTIFACT_DOMAIN }}-${{ vars.CODEARTIFACT_DOMAIN_OWNER }}.d.codeartifact.${{ env.AWS_REGION }}.amazonaws.com/maven/java | ||
| mavenUser=aws | ||
| mavenPassword=$CODEARTIFACT_AUTH_TOKEN | ||
| EOS | ||
|
|
||
| - name: Build with Gradle | ||
| run: ./gradlew build | ||
|
|
||
| - name: Run tests | ||
| run: ./gradlew test | ||
|
|
||
| - name: Publish to CodeArtifact | ||
| run: ./gradlew publish | ||
|
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume these 3 come from Gradle itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess so. I assume there's no difference whether there is the equals sign or if it's omitted.