add debugging info for publishing

This commit is contained in:
ansgarz 2023-06-30 12:44:56 +02:00
parent 700132a163
commit 2f7eb1926e
2 changed files with 10 additions and 2 deletions

View file

@ -64,8 +64,10 @@ publish-maven-package:
when: never when: never
- if: $CI_COMMIT_TAG !~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/ - if: $CI_COMMIT_TAG !~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/
script: script:
- ping -c 2 repo.prod.meissa.de
- ssh-keyscan repo.prod.meissa.de
- ./gradlew -x assemble -x test jar - ./gradlew -x assemble -x test jar
- ./gradlew -x assemble -x test publishLibraryPublicationToMeissaRepository - ./gradlew -x assemble -x test publish
artifacts: artifacts:
paths: paths:
- build/libs/*.jar - build/libs/*.jar

View file

@ -189,7 +189,13 @@ publishing {
credentials(HttpHeaderCredentials) { credentials(HttpHeaderCredentials) {
name = "Authorization" name = "Authorization"
if (System.getenv("CI_JOB_TOKEN") != null) { if (System.getenv("CI_JOB_TOKEN") != null) {
value = "token " + System.getenv("RELEASE_TOKEN") def tok = System.getenv("RELEASE_TOKEN")
if (tok == null) {
println "Error: RELEASE_TOKEN not found"
} else {
value = "token " + tok
println "RELEASE_TOKEN found - " + (10 < tok.length())
}
} else { } else {
// use project-property (define e.g. in "~/.gradle/gradle.properties") when not running in ci // use project-property (define e.g. in "~/.gradle/gradle.properties") when not running in ci
// you can create a token in gitea "Profile and Settings ... > Settings > Applications", Token Name, Select scopes (write:package) > "Generate Token" // you can create a token in gitea "Profile and Settings ... > Settings > Applications", Token Name, Select scopes (write:package) > "Generate Token"