Skip to content

Commit 6c9ed04

Browse files
committed
Add artifactory profile
1 parent b9f8b12 commit 6c9ed04

File tree

3 files changed

+54
-36
lines changed

3 files changed

+54
-36
lines changed

.github/workflows/build-sbm-support-rewrite.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,25 @@ jobs:
1212
run:
1313
working-directory: sbm-support-rewrite
1414
steps:
15-
- name: build-sbm-support-rewrite
15+
16+
- name: Checkout
1617
uses: actions/checkout@v3
17-
- name: setup-java
18+
19+
- name: Setup Java
1820
uses: actions/setup-java@v2
1921
with:
2022
distribution: 'zulu'
2123
java-version: 17
2224
cache: 'maven'
23-
- name: build-project
24-
run: mvn --batch-mode clean install
25+
26+
- name: Maven Build
27+
run: mvn --batch-mode clean package
28+
29+
- name: Deploy to Artifactory
30+
env:
31+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
32+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
33+
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
34+
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
35+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
36+
run: mvn -B deploy -Pci,artifactory

.github/workflows/release-integration.yml

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

sbm-support-rewrite/pom.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<maven.version>3.9.1</maven.version>
2727
<maven-resolver.version>1.9.7</maven-resolver.version>
2828
<maven-wagon-http.version>3.5.3</maven-wagon-http.version>
29+
<artifactory-maven-plugin.version>3.5.1</artifactory-maven-plugin.version>
2930
</properties>
3031

3132
<developers>
@@ -415,6 +416,43 @@ limitations under the License.
415416
</plugins>
416417
</build>
417418
<profiles>
419+
<profile>
420+
<id>artifactory</id>
421+
<properties>
422+
<maven.test.skip>true</maven.test.skip>
423+
</properties>
424+
<build>
425+
<plugins>
426+
<plugin>
427+
<groupId>org.jfrog.buildinfo</groupId>
428+
<artifactId>artifactory-maven-plugin</artifactId>
429+
<version>${artifactory-maven-plugin.version}</version>
430+
<inherited>false</inherited>
431+
<executions>
432+
<execution>
433+
<id>deploy-to-artifactory</id>
434+
<goals>
435+
<goal>publish</goal>
436+
</goals>
437+
<configuration>
438+
<publisher>
439+
<contextUrl>https://repo.spring.io</contextUrl>
440+
<username>${env.ARTIFACTORY_USERNAME}</username>
441+
<password>${env.ARTIFACTORY_PASSWORD}</password>
442+
<repoKey>libs-milestone-local</repoKey>
443+
<snapshotRepoKey>libs-snapshot-local</snapshotRepoKey>
444+
</publisher>
445+
<buildInfo>
446+
<buildName>CI build for ${project.name} ${project.version}</buildName>
447+
</buildInfo>
448+
</configuration>
449+
</execution>
450+
</executions>
451+
</plugin>
452+
</plugins>
453+
</build>
454+
</profile>
455+
418456
<profile>
419457
<id>ci</id>
420458
<build>

0 commit comments

Comments
 (0)