Skip to content

Commit 9e24999

Browse files
CME-529 replace jitpack with azure artifactory
1 parent fdf3de6 commit 9e24999

File tree

4 files changed

+50
-51
lines changed

4 files changed

+50
-51
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to Azure Artifacts
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
PublishToAzureArtifacts:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
19+
- name: Set up JDK
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: 'temurin'
23+
java-version: 21
24+
cache: 'gradle'
25+
26+
- name: Publish to Azure DevOps Artifacts
27+
run: |
28+
./gradlew publish
29+
env:
30+
AZURE_DEVOPS_ARTIFACT_USERNAME: ${{ secrets.AZURE_DEVOPS_ARTIFACT_USERNAME }}
31+
AZURE_DEVOPS_ARTIFACT_TOKEN: ${{ secrets.AZURE_DEVOPS_ARTIFACT_TOKEN }}
32+
RELEASE_VERSION: ${{ github.ref_name }}
33+
shell: bash

.github/workflows/jitpack_build.yml

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

build.gradle

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ plugins {
1313
// This will pick up the version number from release tag
1414
def buildNumber = System.getenv("RELEASE_VERSION")?.replace("refs/tags/", "") ?: "DEV-SNAPSHOT"
1515

16-
group 'uk.gov.hmcts.reform'
17-
version buildNumber
16+
group = 'com.github.hmcts'
17+
version = buildNumber
1818

1919
dependencyUpdates.resolutionStrategy = {
2020
componentSelection { rules ->
@@ -140,8 +140,8 @@ task functionalTest(type: Test) {
140140
repositories {
141141
mavenLocal()
142142
mavenCentral()
143-
maven { url 'https://repo.spring.io/libs-milestone' }
144-
maven { url "https://jitpack.io" }
143+
maven { url = 'https://repo.spring.io/libs-milestone' }
144+
maven { url = 'https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1' }
145145
}
146146

147147
dependencies {
@@ -196,9 +196,9 @@ publishing {
196196
from components.java
197197
artifact sourcesJar
198198
artifact javadocJar
199-
groupId project.group
200-
artifactId 'payments-client'
201-
version project.version
199+
groupId = project.group
200+
artifactId = 'payments-java-client'
201+
version = project.version
202202

203203
pom.withXml {
204204
def root = asNode()
@@ -209,6 +209,16 @@ publishing {
209209
}
210210
}
211211
}
212+
repositories {
213+
maven {
214+
name = "AzureArtifacts"
215+
url = uri("https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1")
216+
credentials {
217+
username = System.getenv("AZURE_DEVOPS_ARTIFACT_USERNAME")
218+
password = System.getenv("AZURE_DEVOPS_ARTIFACT_TOKEN")
219+
}
220+
}
221+
}
212222
}
213223

214224
wrapper {

jitpack.yml

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

0 commit comments

Comments
 (0)