Skip to content
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
33 changes: 33 additions & 0 deletions .github/workflows/ado_artifacts_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish to Azure Artifacts

on:
workflow_dispatch:
push:
tags:
- '*'

jobs:
PublishToAzureArtifacts:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'

- name: Publish to Azure DevOps Artifacts
run: |
./gradlew publish
env:
AZURE_DEVOPS_ARTIFACT_USERNAME: ${{ secrets.AZURE_DEVOPS_ARTIFACT_USERNAME }}
AZURE_DEVOPS_ARTIFACT_TOKEN: ${{ secrets.AZURE_DEVOPS_ARTIFACT_TOKEN }}
RELEASE_VERSION: ${{ github.ref_name }}
shell: bash
41 changes: 0 additions & 41 deletions .github/workflows/jitpack_build.yml

This file was deleted.

9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![GitHub version](https://badge.fury.io/gh/hmcts%2Fjava-logging.svg)](https://badge.fury.io/gh/hmcts%2Fjava-logging)
[![JitPack Badge](https://github.com/hmcts/java-logging/actions/workflows/jitpack_build.yml/badge.svg)](https://github.com/hmcts/java-logging/actions/workflows/jitpack_build.yml)
[![Known Vulnerabilities](https://snyk.io/test/github/hmcts/java-logging/badge.svg)](https://snyk.io/test/github/hmcts/java-logging)

# Java logging
Expand All @@ -22,7 +21,13 @@ Simply add base component as your project's dependency and then one or more of t

Base component dependency, gradle:
```groovy
implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: '6.1.2'
repositories {
maven {
url 'https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1'
}
}

implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: 'LATEST_TAG'
```

#### java-logging-insights
Expand Down
13 changes: 12 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'com.github.ben-manes.versions' version '0.52.0'
}

def buildNumber = System.getenv("RELEASE_VERSION")?.replace("refs/tags/", "") ?: "DEV-SNAPSHOT"
def buildNumber = System.getenv("RELEASE_VERSION")?: "DEV-SNAPSHOT"

allprojects {
group 'com.github.hmcts.java-logging'
Expand Down Expand Up @@ -109,6 +109,17 @@ publishing {
version project.version
}
}

repositories {
maven {
name = "AzureArtifacts"
url = uri("https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1")
credentials {
username = System.getenv("AZURE_DEVOPS_ARTIFACT_USERNAME")
password = System.getenv("AZURE_DEVOPS_ARTIFACT_TOKEN")
}
}
}
}

dependencies {
Expand Down
6 changes: 4 additions & 2 deletions java-logging-appinsights/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ Gradle:

```groovy
repositories {
maven { url 'https://jitpack.io' }
maven {
url 'https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1'
}
}

dependencies {
implementation group: 'com.github.hmcts.java-logging', name: 'logging-appinsights', version: '6.1.8'
implementation group: 'com.github.hmcts.java-logging', name: 'logging-appinsights', version: 'LATEST_TAG'
}
```

Expand Down
11 changes: 11 additions & 0 deletions java-logging-appinsights/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ publishing {
version project.version
}
}

repositories {
maven {
name = "AzureArtifacts"
url = uri("https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1")
credentials {
username = System.getenv("AZURE_DEVOPS_ARTIFACT_USERNAME")
password = System.getenv("AZURE_DEVOPS_ARTIFACT_TOKEN")
}
}
}
}

repositories {
Expand Down