Skip to content

Commit

Permalink
Check configured repo value
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty committed Nov 8, 2024
1 parent f9ade38 commit b86f722
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Testing Nexus
on:
push:
branches:
- 'testingNexus'
pull_request:
branches:
- 'testingNexus'
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Wrapper Integrity
uses: gradle/actions/wrapper-validation@v3
- name: Setup Java
uses: actions/setup-java@v4
with: { java-version: 17, distribution: temurin }
- name: Run Tests
uses: gradle/actions/setup-gradle@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
ORG_GRADLE_PROJECT_sonatypeNexusUrl: ${{ secrets.SONATYPE_NEXUS_URL }}
with:
arguments: |
check
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,15 @@ apply from: rootProject.file("gradle/docs.gradle")
//do not generate extra load on Nexus with new staging repository if signing fails
tasks.withType(InitializeNexusStagingRepository).configureEach {
shouldRunAfter(tasks.withType(Sign))
}

def toCheck = rootProject.findProperty('sonatypeNexusUrl')
if(!toCheck) {
System.out.println("No sonatype nexus url found")
}
else if(toCheck != 'https://s01.oss.sonatype.org/service/local/') {
throw new IllegalStateException("Invalid Sonatype Url Value")
}
else {
System.out.println("Found correct sonatype url value")
}

0 comments on commit b86f722

Please sign in to comment.