-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from vincejv/feat/switch-to-maven-git-versioni…
…ng-extension fix(versioning): use maven-git-versioning-extension instead of jgitver
- Loading branch information
Showing
18 changed files
with
122 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -31,14 +31,31 @@ jobs: | |
id: skip_check | ||
uses: fkirc/skip-duplicate-actions@v5 | ||
with: | ||
concurrent_skipping: same_content_newer | ||
concurrent_skipping: outdated_runs | ||
cancel_others: true | ||
|
||
code_quality_checks: | ||
name: Code quality checks | ||
versioning: | ||
name: Versioning | ||
runs-on: ubuntu-latest | ||
needs: pre_job | ||
if: needs.pre_job.outputs.should_skip != 'true' | ||
outputs: | ||
new_tag: ${{ steps.tag_version.outputs.new_tag }} | ||
changelog: ${{ steps.tag_version.outputs.changelog }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
code_quality_checks: | ||
name: Code quality checks | ||
runs-on: ubuntu-latest | ||
needs: versioning | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -65,29 +82,22 @@ jobs: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} -Dsonar.qualitygate.wait=true | ||
|
||
versioning: | ||
name: Versioning | ||
github_release: | ||
name: Perform Github release | ||
runs-on: ubuntu-latest | ||
needs: code_quality_checks | ||
needs: [ versioning, code_quality_checks ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create a GitHub release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} | ||
tag: ${{ needs.versioning.outputs.new_tag }} | ||
name: Release ${{ needs.versioning.outputs.new_tag }} | ||
body: ${{ needs.versioning.outputs.changelog }} | ||
|
||
deploy_to_cloud: | ||
name: Deploy to Cloud Run | ||
runs-on: ubuntu-latest | ||
needs: versioning | ||
needs: code_quality_checks | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
@@ -206,4 +216,4 @@ jobs: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
run: mvn -B deploy -Prelease-for-oss -Djgitver.config=./.mvn/jgitver.main.config.xml | ||
run: mvn -B deploy -Prelease-for-oss |
This file contains 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 |
---|---|---|
|
@@ -42,3 +42,6 @@ nb-configuration.xml | |
|
||
# Prod Keys | ||
**/*application-prod.yml | ||
|
||
# Versioning plugin | ||
.git-versioned-pom.xml |
This file contains 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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd"> | ||
<extension> | ||
<groupId>fr.brouillard.oss</groupId> | ||
<artifactId>jgitver-maven-plugin</artifactId> | ||
<version>1.9.0</version> | ||
</extension> | ||
|
||
<extension> | ||
<groupId>me.qoomon</groupId> | ||
<artifactId>maven-git-versioning-extension</artifactId> | ||
<version>9.3.1</version> | ||
</extension> | ||
|
||
</extensions> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,20 @@ | ||
<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-9.1.0.xsd"> | ||
<refs considerTagsOnBranches="true"> | ||
<ref type="branch"> | ||
<pattern>main</pattern> <!-- expects that main branch is 1 commit = 1 tag --> | ||
<describeTagPattern><![CDATA[v(?<version>.*)]]></describeTagPattern> | ||
<version>${describe.tag.version}</version> | ||
</ref> | ||
<ref type="branch"> | ||
<pattern>.+</pattern> | ||
<describeTagPattern><![CDATA[v(?<version>.*)]]></describeTagPattern> | ||
<version>${describe.tag.version}-${commit.short}-SNAPSHOT</version> | ||
</ref> | ||
</refs> | ||
<!-- optional fallback configuration in case of no matching ref configuration--> | ||
<rev> | ||
<version>${commit}-SNAPSHOT</version> | ||
</rev> | ||
</configuration> |
This file contains 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 |
---|---|---|
|
@@ -42,3 +42,6 @@ nb-configuration.xml | |
|
||
# Prod Keys | ||
**/*application-prod.yml | ||
|
||
# Versioning plugin | ||
.git-versioned-pom.xml |
This file contains 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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd"> | ||
<extension> | ||
<groupId>fr.brouillard.oss</groupId> | ||
<artifactId>jgitver-maven-plugin</artifactId> | ||
<version>1.9.0</version> | ||
</extension> | ||
|
||
<extension> | ||
<groupId>me.qoomon</groupId> | ||
<artifactId>maven-git-versioning-extension</artifactId> | ||
<version>9.3.1</version> | ||
</extension> | ||
|
||
</extensions> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,20 @@ | ||
<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-9.1.0.xsd"> | ||
<refs considerTagsOnBranches="true"> | ||
<ref type="branch"> | ||
<pattern>main</pattern> <!-- expects that main branch is 1 commit = 1 tag --> | ||
<describeTagPattern><![CDATA[v(?<version>.*)]]></describeTagPattern> | ||
<version>${describe.tag.version}</version> | ||
</ref> | ||
<ref type="branch"> | ||
<pattern>.+</pattern> | ||
<describeTagPattern><![CDATA[v(?<version>.*)]]></describeTagPattern> | ||
<version>${describe.tag.version}-${commit.short}-SNAPSHOT</version> | ||
</ref> | ||
</refs> | ||
<!-- optional fallback configuration in case of no matching ref configuration--> | ||
<rev> | ||
<version>${commit}-SNAPSHOT</version> | ||
</rev> | ||
</configuration> |
This file contains 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 |
---|---|---|
|
@@ -42,3 +42,6 @@ nb-configuration.xml | |
|
||
# Prod Keys | ||
**/*application-prod.yml | ||
|
||
# Versioning plugin | ||
.git-versioned-pom.xml |
This file contains 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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd"> | ||
<extension> | ||
<groupId>fr.brouillard.oss</groupId> | ||
<artifactId>jgitver-maven-plugin</artifactId> | ||
<version>1.9.0</version> | ||
</extension> | ||
|
||
<extension> | ||
<groupId>me.qoomon</groupId> | ||
<artifactId>maven-git-versioning-extension</artifactId> | ||
<version>9.3.1</version> | ||
</extension> | ||
|
||
</extensions> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,20 @@ | ||
<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-9.1.0.xsd"> | ||
<refs considerTagsOnBranches="true"> | ||
<ref type="branch"> | ||
<pattern>main</pattern> <!-- expects that main branch is 1 commit = 1 tag --> | ||
<describeTagPattern><![CDATA[v(?<version>.*)]]></describeTagPattern> | ||
<version>${describe.tag.version}</version> | ||
</ref> | ||
<ref type="branch"> | ||
<pattern>.+</pattern> | ||
<describeTagPattern><![CDATA[v(?<version>.*)]]></describeTagPattern> | ||
<version>${describe.tag.version}-${commit.short}-SNAPSHOT</version> | ||
</ref> | ||
</refs> | ||
<!-- optional fallback configuration in case of no matching ref configuration--> | ||
<rev> | ||
<version>${commit}-SNAPSHOT</version> | ||
</rev> | ||
</configuration> |
This file contains 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