Skip to content

Commit

Permalink
DEVEM-535 replace gradle env and fix publishing url
Browse files Browse the repository at this point in the history
  • Loading branch information
hechmi-dammak-xenit committed Aug 31, 2023
1 parent 304b132 commit 7cb5dbe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ name: CI
on:
push:
workflow_dispatch:
schedule:
- cron: '7 0 * * SUN'
env:
ORG_GRADLE_PROJECT_alfresco_nexus_username: ${{ secrets.ALFRESCO_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_alfresco_nexus_password: ${{ secrets.ALFRESCO_NEXUS_PASSWORD }}

GRADLE_OPTS: >-
-Dorg.gradle.project.org.alfresco.maven.nexus.username=${{ secrets.ALFRESCO_NEXUS_USERNAME }}
-Dorg.gradle.project.org.alfresco.maven.nexus.password=${{ secrets.ALFRESCO_NEXUS_PASSWORD }}
jobs:
test:
runs-on: ubuntu-latest
Expand Down
13 changes: 0 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ sonarqube {
}
}

def copyPropertyValueIfExists(sourcePropertyName, targetPropertyName) {
if (project.hasProperty(sourcePropertyName)) {
project.ext[targetPropertyName] = project.property(sourcePropertyName)
}
}

allprojects {
group = 'eu.xenit.de'
Expand All @@ -39,14 +34,6 @@ allprojects {
version += "-SNAPSHOT"
}

// It is not possible to set properties with a dot via GitHub Actions env variables, therefore we introduce support
// for a non-dotted-equivalent
copyPropertyValueIfExists('alfresco_nexus_username', 'org.alfresco.maven.nexus.username')
copyPropertyValueIfExists('alfresco_nexus_password', 'org.alfresco.maven.nexus.password')
copyPropertyValueIfExists('xenit_docker_registry_url', 'eu.xenit.docker.registry.url')
copyPropertyValueIfExists('xenit_docker_registry_username', 'eu.xenit.docker.registry.username')
copyPropertyValueIfExists('xenit_docker_registry_password', 'eu.xenit.docker.registry.password')

project.pluginManager.withPlugin('java-base') {
project.sourceCompatibility = 1.8
}
Expand Down
4 changes: 2 additions & 2 deletions publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ publishing {

repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl

credentials {
Expand Down

0 comments on commit 7cb5dbe

Please sign in to comment.