diff options
-rw-r--r-- | .gitlab-ci.yml | 6 | ||||
-rw-r--r-- | moaSig/build.gradle | 39 | ||||
-rw-r--r-- | moaSig/moa-asic/build.gradle | 4 | ||||
-rw-r--r-- | moaSig/moa-sig-lib/build.gradle | 2 | ||||
-rw-r--r-- | moaSig/moa-sig/build.gradle | 2 |
5 files changed, 47 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8cd5193..c207bdd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,9 +46,13 @@ release_packaging: - docker except: - tags + before_script: + - mkdir -p ~/.ssh + - ssh-keyscan apps.egiz.gv.at >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts script: | cd ./moaSig - ./gradlew assemble + ./gradlew assemble uploadArchives artifacts: when: always name: "${CI_PROJECT_NAME}-${CI_COMMIT_SHORT_SHA}" diff --git a/moaSig/build.gradle b/moaSig/build.gradle index 3935b41..fb629c3 100644 --- a/moaSig/build.gradle +++ b/moaSig/build.gradle @@ -13,12 +13,13 @@ subprojects { apply plugin: 'java-library' apply plugin: 'eclipse' apply plugin: 'maven-publish' + apply plugin: 'maven' repositories { mavenCentral() maven { - url "https://apps.egiz.gv.at/maven/" + url "https://apps.egiz.gv.at/maven/" mavenContent { releasesOnly() } @@ -65,6 +66,42 @@ subprojects { } } + task deployJar(type: Jar) + + configurations { + deployerJars + + } + + //configurations.archives.artifacts.removeAll {PublishArtifact publishArtifact -> publishArtifact.extension == 'zip'} + + //configurations.archives.artifacts.removeAll { + // exclude from the archives configuration all artifacts that were generated by distZip & distTar + // def depTasks = it.getBuildDependencies().getDependencies() + // depTasks.contains(distZip) || depTasks.contains(distTar) + //} + + + dependencies { + deployerJars "org.apache.maven.wagon:wagon-ssh:2.9" + + } + + uploadArchives { + repositories.mavenDeployer { + configuration = configurations.deployerJars + repository(url: "sftp://apps.egiz.gv.at/maven") { + authentication(userName: System.getenv("EGIZ_MAVEN_USER"), password: System.getenv("EGIZ_MAVEN_PASSWORD")) + + } + snapshotRepository(url: "sftp://apps.egiz.gv.at/maven-snaphot") { + authentication(userName: System.getenv("EGIZ_MAVEN_USER"), password: System.getenv("EGIZ_MAVEN_PASSWORD")) + + } + } + } + + } def getCheckedOutGitCommitHash() { diff --git a/moaSig/moa-asic/build.gradle b/moaSig/moa-asic/build.gradle index 3ef15cb..a11f6ca 100644 --- a/moaSig/moa-asic/build.gradle +++ b/moaSig/moa-asic/build.gradle @@ -52,8 +52,8 @@ task jaxb () { task releases(type: Copy) { //from jar.outputs - //from distZip.outputs - from distTar.outputs + from distZip.outputs + //from distTar.outputs into rootDir.toString() + "/releases/" + version } diff --git a/moaSig/moa-sig-lib/build.gradle b/moaSig/moa-sig-lib/build.gradle index 4f13db2..08d6a82 100644 --- a/moaSig/moa-sig-lib/build.gradle +++ b/moaSig/moa-sig-lib/build.gradle @@ -39,6 +39,6 @@ dependencies { task releases(type: Copy) { //from jar.outputs from distZip.outputs - from distTar.outputs + //from distTar.outputs into rootDir.toString() + "/releases/" + version } diff --git a/moaSig/moa-sig/build.gradle b/moaSig/moa-sig/build.gradle index 44cca7c..ed56524 100644 --- a/moaSig/moa-sig/build.gradle +++ b/moaSig/moa-sig/build.gradle @@ -98,6 +98,6 @@ def findJar(prefix) { task releases(type: Copy) { from distZip.outputs - from distTar.outputs + //from distTar.outputs into rootDir.toString() + "/releases/" + version } |