Skip to content

Commit 4901cbd

Browse files
committed
Migrated deployment of cds-feature-auditlog-ng from [OSS](https://oss.sonatype.org) to [Central Portal](https://central.sonatype.com/).
1 parent 034b8a8 commit 4901cbd

File tree

7 files changed

+79
-324
lines changed

7 files changed

+79
-324
lines changed

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

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ inputs:
88
password:
99
description: "The password used for the upload (technical user for maven central upload)"
1010
required: true
11-
profile:
12-
description: "The profile id"
13-
required: true
1411
pgp-pub-key:
1512
description: "The public pgp key ID"
1613
required: true
@@ -33,7 +30,6 @@ runs:
3330
- name: Echo Inputs
3431
run: |
3532
echo "user: ${{ inputs.user }}"
36-
echo "profile: ${{ inputs.profile }}"
3733
echo "revision: ${{ inputs.revision }}"
3834
shell: bash
3935

@@ -43,7 +39,7 @@ runs:
4339
distribution: sapmachine
4440
java-version: '17'
4541
cache: maven
46-
server-id: ossrh
42+
server-id: central
4743
server-username: MAVEN_CENTRAL_USER
4844
server-password: MAVEN_CENTRAL_PASSWORD
4945

@@ -59,36 +55,17 @@ runs:
5955
env:
6056
PASSPHRASE: ${{ inputs.pgp-passphrase }}
6157

62-
- name: Deploy Locally
58+
- name: Deploy to Maven Central
6359
run: >
64-
mvn -B -ntp -fae --show-version
65-
-Durl=file:./temp_local_repo
60+
mvn -B -ntp --show-version
6661
-Dmaven.install.skip=true
6762
-Dmaven.test.skip=true
6863
-Dgpg.passphrase="$GPG_PASSPHRASE"
6964
-Dgpg.keyname="$GPG_PUB_KEY"
70-
-Drevision="${{ inputs.revision }}"
71-
deploy
72-
working-directory: ./deploy-oss
65+
clean deploy
7366
shell: bash
7467
env:
7568
MAVEN_CENTRAL_USER: ${{ inputs.user }}
7669
MAVEN_CENTRAL_PASSWORD: ${{ inputs.password }}
7770
GPG_PASSPHRASE: ${{ inputs.pgp-passphrase }}
7871
GPG_PUB_KEY: ${{ inputs.pgp-pub-key }}
79-
80-
- name: Deploy Staging
81-
run: >
82-
mvn -B -ntp -fae --show-version
83-
org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy-staged-repository
84-
-DserverId=ossrh
85-
-DnexusUrl=https://oss.sonatype.org
86-
-DrepositoryDirectory=./temp_local_repo
87-
-DstagingProfileId="$MAVEN_CENTRAL_PROFILE_ID"
88-
-Drevision="${{ inputs.revision }}"
89-
working-directory: ./deploy-oss
90-
shell: bash
91-
env:
92-
MAVEN_CENTRAL_USER: ${{ inputs.user }}
93-
MAVEN_CENTRAL_PASSWORD: ${{ inputs.password }}
94-
MAVEN_CENTRAL_PROFILE_ID: ${{ inputs.profile }}

.github/actions/deploy/action.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/actions/newrelease/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ runs:
3030
mvn --no-transfer-progress versions:set-property -Dproperty=revision -DnewVersion=$VERSION
3131
git config --global user.name 'github-actions[bot]'
3232
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
33-
git checkout -b main
33+
git checkout -B main
3434
git commit -am "Update version to $VERSION"
3535
git push --set-upstream origin main
36-
shell: bash
36+
shell: bash

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

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to OSS
1+
name: Deploy to Maven Central
22

33
env:
44
JAVA_VERSION: '17'
@@ -9,35 +9,35 @@ on:
99
types: [ "released" ]
1010

1111
jobs:
12+
blackduck:
13+
name: Blackduck Scan
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 15
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
1219

13-
# blackduck:
14-
# name: "Blackduck Scan"
15-
# runs-on: ubuntu-latest
16-
# timeout-minutes: 15
17-
# steps:
18-
# - name: Checkout
19-
# uses: actions/checkout@v4
20-
# - name: "Scan With Black Duck"
21-
# uses: ./.github/actions/scan-with-blackduck
22-
# with:
23-
# blackduck_token: ${{ secrets.BLACK_DUCK_TOKEN }}
24-
# github_token: ${{ secrets.GITHUB_TOKEN }}
25-
# maven-version: ${{ env.MAVEN_VERSION }}
20+
- name: Scan With Black Duck
21+
uses: ./.github/actions/scan-with-blackduck
22+
with:
23+
blackduck_token: ${{ secrets.BLACK_DUCK_TOKEN }}
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
maven-version: ${{ env.MAVEN_VERSION }}
2626

2727
update-version:
28+
name: Update Version
2829
runs-on: ubuntu-latest
29-
# needs: blackduck
3030
steps:
3131
- name: Checkout
3232
uses: actions/checkout@v4
33-
#with:
34-
# token: ${{ secrets.GH_TOKEN }}
33+
with:
34+
token: ${{ secrets.GH_TOKEN }}
3535

36-
#- name: Update version
37-
# uses: ./.github/actions/newrelease
38-
# with:
39-
# java-version: ${{ env.JAVA_VERSION }}
40-
# maven-version: ${{ env.MAVEN_VERSION }}
36+
- name: Update version
37+
uses: ./.github/actions/newrelease
38+
with:
39+
java-version: ${{ env.JAVA_VERSION }}
40+
maven-version: ${{ env.MAVEN_VERSION }}
4141

4242
- name: Upload Changed Artifacts
4343
uses: actions/upload-artifact@v4
@@ -48,6 +48,7 @@ jobs:
4848
retention-days: 1
4949

5050
build:
51+
name: Build and Sonar Scan
5152
runs-on: ubuntu-latest
5253
needs: update-version
5354
steps:
@@ -62,13 +63,13 @@ jobs:
6263
java-version: ${{ env.JAVA_VERSION }}
6364
maven-version: ${{ env.MAVEN_VERSION }}
6465

65-
#- name: SonarQube Scan
66-
# uses: ./.github/actions/scan-with-sonar
67-
# with:
68-
# java-version: ${{ env.JAVA_VERSION }}
69-
# maven-version: ${{ env.MAVEN_VERSION }}
70-
# sonarq-token: ${{ secrets.SONARQ_TOKEN }}
71-
# github-token: ${{ secrets.GITHUB_TOKEN }}
66+
- name: Sonar Scan
67+
uses: ./.github/actions/scan-with-sonar
68+
with:
69+
java-version: ${{ env.JAVA_VERSION }}
70+
maven-version: ${{ env.MAVEN_VERSION }}
71+
sonarq-token: ${{ secrets.SONARQ_TOKEN }}
72+
github-token: ${{ secrets.GITHUB_TOKEN }}
7273

7374
- name: Upload Changed Artifacts
7475
uses: actions/upload-artifact@v4
@@ -81,7 +82,7 @@ jobs:
8182
deploy:
8283
name: Deploy to Maven Central
8384
runs-on: ubuntu-latest
84-
needs: build
85+
needs: [blackduck, build]
8586
steps:
8687
- name: Download artifact
8788
uses: actions/download-artifact@v4
@@ -91,9 +92,8 @@ jobs:
9192
- name: Deploy
9293
uses: ./.github/actions/deploy-release
9394
with:
94-
user: ${{ secrets.OSSRH_SONATYPE_ORG_API_USER }}
95-
password: ${{ secrets.OSSRH_SONATYPE_ORG_API_PASSWD }}
96-
profile: ${{ secrets.OSSRH_SONATYPE_ORG_PROFILE_ID }}
95+
user: ${{ secrets.CENTRAL_REPOSITORY_USER }}
96+
password: ${{ secrets.CENTRAL_REPOSITORY_PASS }}
9797
pgp-pub-key: ${{ secrets.PGP_PUBKEY_ID }}
9898
pgp-private-key: ${{ secrets.PGP_PRIVATE_KEY }}
9999
pgp-passphrase: ${{ secrets.PGP_PASSPHRASE }}

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

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)