Skip to content

Commit c170875

Browse files
Merge pull request #72 from hmcts/CME-530-remove-jitpack
CME-530 replace jitpack with azure artifactory
2 parents 05ac19a + e82a826 commit c170875

File tree

6 files changed

+52
-51
lines changed

6 files changed

+52
-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/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-java@v4
1818
with:
19-
java-version: '17'
19+
java-version: '21'
2020
distribution: 'temurin'
2121
cache: gradle
2222
- name: Build

.github/workflows/jitpack_build.yml

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

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
[![Release](https://jitpack.io/v/hmcts/idam-legacy-auth-support.svg)](https://jitpack.io/#hmcts/idam-legacy-auth-support)
2-
[![JitPack Badge](https://github.com/hmcts/idam-legacy-auth-support/actions/workflows/jitpack_build.yml/badge.svg)](https://github.com/hmcts/idam-legacy-auth-support/actions/workflows/jitpack_build.yml)
1+
[![Azure Build Badge](https://github.com/hmcts/idam-legacy-auth-support/actions/workflows/ado_artifacts_build.yml/badge.svg)](https://github.com/hmcts/idam-legacy-auth-support/actions/workflows/ado_artifacts_build.yml)
32

43
# IdAM Legacy Auth Support
54
A Java module to simplify IdAM password grant calls, and S2S lease calls.
@@ -24,7 +23,7 @@ Once you have integrated with spring security you can user the standard annotati
2423

2524
Note that the SIDAM team do not maintain S2S, but have included support for it here for simplicity.
2625

27-
The library has auto configuration enabled based on spring properties, so all you need to do to start using it is import the library into
26+
The library has auto configuration enabled based on spring properties, so all you need to do to start using it is import the library into
2827
your spring boot project and apply the correct configuration as described below.
2928

3029
### Spring Password Grants
@@ -59,7 +58,7 @@ spring:
5958
- roles
6059
```
6160

62-
Once that is done then any feign calls that you make that match the `endpoint-regex` will have an Authentication header with the
61+
Once that is done then any feign calls that you make that match the `endpoint-regex` will have an Authentication header with the
6362
password grant bearer token. The fetching/caching of the token is handled by spring security.
6463

6564
When the password grant support is active you will see a message similar to the following on application startup:
@@ -96,7 +95,7 @@ idam:
9695
testing-support:
9796
enabled: true
9897
```
99-
This can be useful if you are developing before your microservice has been deployed to S2S. When running in testing-support mode
98+
This can be useful if you are developing before your microservice has been deployed to S2S. When running in testing-support mode
10099
you will see a message similar to the following at startup:
101100
```
102101
RpeS2SAutoConfiguration idam-legacy-auth-support: Configured s2sTestingSupportAuthTokenGenerator for service: my-service-s2s-id

build.gradle

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ plugins {
1111
id 'com.github.ben-manes.versions' version '0.52.0'
1212
}
1313

14+
def buildNumber = System.getenv("RELEASE_VERSION")?.replace("refs/tags/", "") ?: "DEV-SNAPSHOT"
15+
1416
group = 'com.github.hmcts'
15-
version = 'dev-snapshot'
17+
version = buildNumber
1618

1719
java {
1820
toolchain {
@@ -49,7 +51,7 @@ dependencyManagement {
4951

5052
repositories {
5153
mavenCentral()
52-
maven { url 'https://jitpack.io' }
54+
maven { url = 'https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1' }
5355
google()
5456
}
5557

@@ -104,6 +106,16 @@ publishing {
104106
version project.version
105107
}
106108
}
109+
repositories {
110+
maven {
111+
name = "AzureArtifacts"
112+
url = uri("https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1")
113+
credentials {
114+
username = System.getenv("AZURE_DEVOPS_ARTIFACT_USERNAME")
115+
password = System.getenv("AZURE_DEVOPS_ARTIFACT_TOKEN")
116+
}
117+
}
118+
}
107119
}
108120

109121
bootJar {

jitpack.yml

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

0 commit comments

Comments
 (0)