test develop pipeline
This commit is contained in:
84
.github/workflows/build-and-publish-develop.yml
vendored
84
.github/workflows/build-and-publish-develop.yml
vendored
@@ -22,9 +22,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-java@v4.2.2
|
- uses: actions/setup-java@v4.2.2
|
||||||
|
if: ${{ hashFiles('**/pom.xml') }}
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
distribution: zulu
|
||||||
|
cache: 'maven'
|
||||||
- name: maven-settings-xml-action
|
- name: maven-settings-xml-action
|
||||||
uses: whelk-io/maven-settings-xml-action@v22
|
uses: whelk-io/maven-settings-xml-action@v22
|
||||||
with:
|
with:
|
||||||
@@ -78,19 +80,50 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-java@v4.2.2
|
- uses: actions/setup-java@v4.2.2
|
||||||
|
if: ${{ hashFiles('**/pom.xml') }}
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
distribution: zulu
|
||||||
|
cache: 'maven'
|
||||||
|
- name: maven-settings-xml-action
|
||||||
|
uses: whelk-io/maven-settings-xml-action@v22
|
||||||
|
with:
|
||||||
|
profiles: >
|
||||||
|
[{
|
||||||
|
"id": "homelab",
|
||||||
|
"properties": {
|
||||||
|
"altSnapshotDeploymentRepository": "nexus-snapshot::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL}",
|
||||||
|
"altReleaseDeploymentRepository": "nexus-release::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL}"
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
repositories: >
|
||||||
|
[{
|
||||||
|
"id": "maven-public",
|
||||||
|
"url": "${env.MAVEN_PUBLIC_REPOSITORY_URL}",
|
||||||
|
"snapshots": {
|
||||||
|
"enabled": "true"
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
servers: >
|
||||||
|
[{
|
||||||
|
"id": "nexus-snapshot",
|
||||||
|
"username": "${env.NEXUS_USERNAME}",
|
||||||
|
"password": "${env.NEXUS_PASSWORD}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "nexus-release",
|
||||||
|
"username": "${env.NEXUS_USERNAME}",
|
||||||
|
"password": "${env.NEXUS_PASSWORD}"
|
||||||
|
}]
|
||||||
- name: Maven Package
|
- name: Maven Package
|
||||||
env:
|
env:
|
||||||
NEXUS_USERNAME: 'edward'
|
NEXUS_USERNAME: 'edward'
|
||||||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
||||||
|
MAVEN_PUBLIC_REPOSITORY_URL: ${{ secrets.MAVEN_PUBLIC_REPOSITORY_URL }}
|
||||||
SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }}
|
SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }}
|
||||||
RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }}
|
RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }}
|
||||||
run: |
|
run: |
|
||||||
mvn -B package \
|
mvn -B package -P homelab
|
||||||
-P homelab \
|
|
||||||
--settings=${{ github.workspace }}/.mvn/settings.xml
|
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: |
|
run: |
|
||||||
platform=${{ matrix.platform }}
|
platform=${{ matrix.platform }}
|
||||||
@@ -130,27 +163,56 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
merge-docker:
|
merge-docker:
|
||||||
if: false
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- build-docker
|
- build-docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-java@v4.2.2
|
- uses: actions/setup-java@v4.2.2
|
||||||
|
if: ${{ hashFiles('**/pom.xml') }}
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
distribution: zulu
|
||||||
|
cache: 'maven'
|
||||||
|
- name: maven-settings-xml-action
|
||||||
|
uses: whelk-io/maven-settings-xml-action@v22
|
||||||
|
with:
|
||||||
|
profiles: >
|
||||||
|
[{
|
||||||
|
"id": "homelab",
|
||||||
|
"properties": {
|
||||||
|
"altSnapshotDeploymentRepository": "nexus-snapshot::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL}",
|
||||||
|
"altReleaseDeploymentRepository": "nexus-release::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL}"
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
repositories: >
|
||||||
|
[{
|
||||||
|
"id": "maven-public",
|
||||||
|
"url": "${env.MAVEN_PUBLIC_REPOSITORY_URL}",
|
||||||
|
"snapshots": {
|
||||||
|
"enabled": "true"
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
servers: >
|
||||||
|
[{
|
||||||
|
"id": "nexus-snapshot",
|
||||||
|
"username": "${env.NEXUS_USERNAME}",
|
||||||
|
"password": "${env.NEXUS_PASSWORD}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "nexus-release",
|
||||||
|
"username": "${env.NEXUS_USERNAME}",
|
||||||
|
"password": "${env.NEXUS_PASSWORD}"
|
||||||
|
}]
|
||||||
- name: Extract Maven project version
|
- name: Extract Maven project version
|
||||||
id: project-version
|
id: project-version
|
||||||
env:
|
env:
|
||||||
NEXUS_USERNAME: 'edward'
|
NEXUS_USERNAME: 'edward'
|
||||||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
||||||
|
MAVEN_PUBLIC_REPOSITORY_URL: ${{ secrets.MAVEN_PUBLIC_REPOSITORY_URL }}
|
||||||
SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }}
|
SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }}
|
||||||
RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }}
|
RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }}
|
||||||
run: |
|
run: |
|
||||||
VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout -P homelab --settings=${{ github.workspace }}/.mvn/settings.xml)
|
VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout -P homelab)
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
- name: Show extracted Maven project version
|
- name: Show extracted Maven project version
|
||||||
run: echo ${{ steps.project-version.outputs.version }}
|
run: echo ${{ steps.project-version.outputs.version }}
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
<settings>
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>homelab</id>
|
|
||||||
<properties>
|
|
||||||
<altSnapshotDeploymentRepository>nexus-snapshot::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL}</altSnapshotDeploymentRepository>
|
|
||||||
<altReleaseDeploymentRepository>nexus-release::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL}</altReleaseDeploymentRepository>
|
|
||||||
</properties>
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>nexus-snapshot</id>
|
|
||||||
<name>Home Lab Nexus Snapshot</name>
|
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
<updatePolicy>always</updatePolicy>
|
|
||||||
<checksumPolicy>warn</checksumPolicy>
|
|
||||||
</snapshots>
|
|
||||||
<url>${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL}</url>
|
|
||||||
<layout>default</layout>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
|
||||||
<id>nexus-release</id>
|
|
||||||
<name>Home Lab Nexus Release</name>
|
|
||||||
<releases>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
<updatePolicy>always</updatePolicy>
|
|
||||||
<checksumPolicy>warn</checksumPolicy>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</snapshots>
|
|
||||||
<url>${env.RELEASE_DEPLOYMENT_REPOSITORY_URL}</url>
|
|
||||||
<layout>default</layout>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
<servers>
|
|
||||||
<server>
|
|
||||||
<id>nexus-snapshot</id>
|
|
||||||
<username>${env.NEXUS_USERNAME}</username>
|
|
||||||
<password>${env.NEXUS_PASSWORD}</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>nexus-release</id>
|
|
||||||
<username>${env.NEXUS_USERNAME}</username>
|
|
||||||
<password>${env.NEXUS_PASSWORD}</password>
|
|
||||||
</server>
|
|
||||||
</servers>
|
|
||||||
</settings>
|
|
||||||
Reference in New Issue
Block a user