Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new reusable builds #450

Merged
merged 2 commits into from
Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy with Maven

on:
workflow_dispatch:
branches:
- 'develop'
- 'master'
- 'releases/*'
- 'test/ci'
inputs:
release_type:
type: choice
description:
default: snapshot
options:
- snapshot
- release
environment:
type: environment
default: internal-publish
description: internal or external repository
push:
branches:
- 'develop'
- 'test/ci'



jobs:
maven-deploy-internal:
if: ${{ github.event_name == 'push' }}
name: Deploy to ${{ inputs.environment }}
uses: wultra/wultra-infrastructure/.github/workflows/maven-deploy.yml@develop
with:
environment: internal-publish
release_type: snapshot
secrets:
username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

maven-deploy-public:
if: ${{ github.event_name == 'workflow_dispatch' }}
name: Deploy to ${{ inputs.environment }}
uses: wultra/wultra-infrastructure/.github/workflows/maven-deploy.yml@develop
with:
environment: ${{ inputs.environment }}
release_type: ${{ inputs.release_type }}
secrets:
username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
19 changes: 0 additions & 19 deletions .github/workflows/maven-publish.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
workflow_dispatch:
push:
branches:
- 'develop'
- 'master'
- 'releases/**'
- 'develop'
- 'master'
- 'releases/**'
- 'test/ci'
pull_request:
branches:
- 'develop'
Expand All @@ -15,4 +16,4 @@ on:

jobs:
maven-tests:
uses: wultra/wultra-infrastructure/.github/workflows/maven-test.yml@develop
uses: wultra/wultra-infrastructure/.github/workflows/maven-test.yml@develop
71 changes: 60 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,66 @@
</plugins>
</build>
</profile>
<profile>
<id>internal-repository</id>
<activation>
<property>
<name>useInternalRepo</name>
<value>true</value>
</property>
</activation>
<properties>
</properties>
<distributionManagement>
<repository>
<id>jfrog-central</id>
<name>Wultra Artifactory-releases</name>
<url>https://wultra.jfrog.io/artifactory/internal-maven-repository</url>
</repository>
<snapshotRepository>
<id>jfrog-central</id>
<name>Wultra Artifactory-snapshots</name>
<url>https://wultra.jfrog.io/artifactory/internal-maven-repository</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>jfrog-central</id>
<name>Wultra Artifactory-releases</name>
<url>https://wultra.jfrog.io/artifactory/internal-maven-repository</url>
</repository>
<repository>
<id>ossrh-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
<profile>
<id>public-repository</id>
<activation>
<property>
<name>!useInternalRepo</name>
</property>
</activation>
<properties>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh-snapshots-distribution</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh-staging-distribution</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>

<repositories>
Expand All @@ -276,15 +336,4 @@
</repository>
</repositories>

<distributionManagement>
<snapshotRepository>
<id>ossrh-snapshots-distribution-s01</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh-staging-distribution-s01</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

</project>