Skip to content

Commit 8ca551a

Browse files
committed
Switch from Concourse to GitHub Actions to deploy snapshots
Closes gh-39851
1 parent 1c8de17 commit 8ca551a

File tree

2 files changed

+59
-10
lines changed

2 files changed

+59
-10
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build and deploy snapshot
2+
on:
3+
push:
4+
branches:
5+
- 3.1.x
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
jobs:
9+
build-and-deploy-snapshot:
10+
if: ${{ github.repository == 'spring-projects/spring-boot' }}
11+
name: Build and deploy snapshot
12+
runs-on: ubuntu22-8-32
13+
steps:
14+
- name: Set up Java
15+
uses: actions/setup-java@v4
16+
with:
17+
distribution: 'liberica'
18+
java-version: 17
19+
- name: Check out code
20+
uses: actions/checkout@v4
21+
- name: Set up Gradle
22+
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5
23+
with:
24+
cache-read-only: false
25+
- name: Configure Gradle properties
26+
shell: bash
27+
run: |
28+
mkdir -p $HOME/.gradle
29+
echo 'systemProp.user.name=spring-builds+github' >> $HOME/.gradle/gradle.properties
30+
echo 'systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false' >> $HOME/.gradle/gradle.properties
31+
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
32+
- name: Build and publish
33+
id: build
34+
env:
35+
CI: 'true'
36+
GRADLE_ENTERPRISE_URL: 'https://ge.spring.io'
37+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
38+
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
39+
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
40+
run: ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository build publishAllPublicationsToDeploymentRepository
41+
- name: Deploy
42+
uses: spring-io/artifactory-deploy-action@8f794d7e1c1e99a4f6afa3b87a9d1410853c1709
43+
with:
44+
uri: 'https://repo.spring.io'
45+
username: ${{ secrets.ARTIFACTORY_USERNAME }}
46+
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
47+
build-name: ${{ format('spring-boot-{0}', github.ref_name)}}
48+
repository: 'libs-snapshot-local'
49+
folder: 'deployment-repository'
50+
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
51+
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}
52+
- name: Send notification
53+
uses: ./.github/actions/send-notification
54+
if: always()
55+
with:
56+
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
57+
status: ${{ job.status }}
58+
build-scan-url: ${{ steps.build.outputs.build-scan-url }}
59+
run-name: ${{ format('{0} | {1} | Java {2}', github.ref_name, matrix.os.name, matrix.java.version) }}

ci/pipeline.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -323,16 +323,6 @@ jobs:
323323
<<: *slack-fail-params
324324
- put: repo-status-build
325325
params: { state: "success", commit: "git-repo" }
326-
- put: artifactory-repo
327-
params:
328-
<<: *artifactory-repo-put-params
329-
get_params:
330-
threads: 8
331-
on_failure:
332-
do:
333-
- put: slack-alert
334-
params:
335-
<<: *slack-fail-params
336326
- put: slack-alert
337327
params:
338328
<<: *slack-success-params

0 commit comments

Comments
 (0)