Skip to content

Commit ac5842b

Browse files
authored
GitHub actions (#265)
1 parent a109ab9 commit ac5842b

File tree

5 files changed

+25
-13
lines changed

5 files changed

+25
-13
lines changed

.github/actions/deploy-release/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ inputs:
2323
revision:
2424
description: "The revision of cds-feature-attachments"
2525
required: true
26+
maven-version:
27+
description: "The Maven version the build shall run with."
28+
required: true
2629

2730
runs:
2831
using: composite
@@ -31,6 +34,7 @@ runs:
3134
run: |
3235
echo "user: ${{ inputs.user }}"
3336
echo "profile: ${{ inputs.profile }}"
37+
echo "revision: ${{ inputs.revision }}"
3438
shell: bash
3539

3640
- name: "Setup Java"
@@ -43,6 +47,11 @@ runs:
4347
server-username: MAVEN_CENTRAL_USER
4448
server-password: MAVEN_CENTRAL_PASSWORD
4549

50+
- name: Setup Maven ${{ inputs.maven-version }}
51+
uses: stCarolas/setup-maven@v5
52+
with:
53+
maven-version: ${{ inputs.maven-version }}
54+
4655
- name: "Import GPG Key"
4756
run: |
4857
echo "${{ inputs.pgp-private-key }}" | gpg --batch --passphrase "$PASSPHRASE" --import

.github/actions/deploy/action.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ inputs:
1818
description: "The path to the POM file."
1919
required: false
2020
default: "pom.xml"
21+
maven-version:
22+
description: "The Maven version the build shall run with."
23+
required: true
2124

2225
runs:
2326
using: composite
@@ -28,6 +31,7 @@ runs:
2831
echo "user: ${{ inputs.user }}"
2932
echo "password: ${{ inputs.password }}"
3033
echo "pom-file: ${{ inputs.pom-file }}"
34+
echo "altDeploymentRepository: ${{inputs.server-id}}::${{inputs.repository-url}}"
3135
shell: bash
3236

3337
- name: "Setup java"
@@ -39,19 +43,18 @@ runs:
3943
server-username: DEPLOYMENT_USER
4044
server-password: DEPLOYMENT_PASS
4145

46+
- name: Setup Maven ${{ inputs.maven-version }}
47+
uses: stCarolas/setup-maven@v5
48+
with:
49+
maven-version: ${{ inputs.maven-version }}
50+
4251
- name: "Publish package"
4352
run: >
44-
mvn
45-
--batch-mode
46-
--no-transfer-progress
47-
--fail-at-end
48-
-Durl=${{ inputs.repository-url }}
49-
-DrepositoryId=${{ inputs.server-id }}
53+
mvn -B -ntp --fae
54+
-pl !integration-tests,!integration-tests/db,!integration-tests/srv
55+
-DaltDeploymentRepository=${{inputs.server-id}}::${{inputs.repository-url}}
5056
-Dmaven.install.skip=true
5157
-Dmaven.test.skip=true
52-
-Dmaven.compiler.showCompilationChanges
53-
-Dhttp.keepAlive=false
54-
-DskipDuringDeploy=true
5558
-f ${{ inputs.pom-file }}
5659
deploy
5760
env:

.github/workflows/main-build-and-deploy-oss.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ jobs:
7676
runs-on: ubuntu-latest
7777
needs: build
7878
steps:
79-
- run: echo "Start deployment to Maven Central"
80-
name: deploy start
81-
8279
- name: Download artifact
8380
uses: actions/download-artifact@v4
8481
with:
@@ -94,6 +91,7 @@ jobs:
9491
pgp-private-key: ${{ secrets.PGP_PRIVATE_KEY }}
9592
pgp-passphrase: ${{ secrets.PGP_PASSPHRASE }}
9693
revision: ${{ github.event.release.tag_name }}
94+
maven-version: ${{ env.MAVEN_VERSION }}
9795

9896
- name: Echo Status
9997
run: echo "The job status is ${{ job.status }}"

.github/workflows/main-build-and-deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ jobs:
8989
user: ${{ secrets.DEPLOYMENT_USER }}
9090
password: ${{ secrets.DEPLOYMENT_PASS }}
9191
server-id: artifactory
92-
repository-url: ${{ env.DEPLOY_REPOSITORY_ID }}
92+
repository-url: ${{ env.DEPLOY_REPOSITORY_URL }}
9393
pom-file: ${{ env.POM_FILE }}
94+
maven-version: ${{ env.MAVEN_VERSION }}
9495

9596
- name: Echo Status
9697
run: echo "The job status is ${{ job.status }}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ cds-feature-attachments/src/test/resources/schema.sql
2626
## files required for local execution of github actions with act
2727
.env
2828
.secrets
29+
event.json

0 commit comments

Comments
 (0)