-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
3,709 additions
and
443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,13 @@ | ||
pipeline { | ||
|
||
agent { | ||
label 'jenkins-agent-machine-1' | ||
} | ||
|
||
stages { | ||
|
||
stage('Build') { | ||
steps { | ||
sh './gradlew build --refresh-dependencies --no-daemon' | ||
} | ||
} | ||
|
||
stage('Upload Jars') { | ||
when { | ||
anyOf{ | ||
branch 'master' | ||
branch 'develop' | ||
} | ||
} | ||
steps { | ||
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'nexus', usernameVariable: 'NEXUS_USER', passwordVariable: 'NEXUS_PASSWORD']]) { | ||
sh './gradlew -PnexusUser=$NEXUS_USER -PnexusPassword=$NEXUS_PASSWORD uploadArchives --no-daemon' | ||
} | ||
} | ||
} | ||
|
||
stage('Build/Upload Docker image') { | ||
when { | ||
anyOf{ | ||
branch 'master' | ||
branch 'develop' | ||
} | ||
} | ||
steps { | ||
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'nexus', usernameVariable: 'NEXUS_USER', passwordVariable: 'NEXUS_PASSWORD']]) { | ||
sh './gradlew -PnexusUser=$NEXUS_USER -PnexusPassword=$NEXUS_PASSWORD pushImage --no-daemon' | ||
} | ||
} | ||
} | ||
} | ||
|
||
} | ||
@Library('[email protected]') _ | ||
buildJavaProject( | ||
buildInfo: getBuildInfo(), | ||
integrationTestsEnvVars: [], | ||
shouldPublishJars: true, | ||
shouldPublishDockerImages: true, | ||
dockerfileDir: 'build/resources/main', | ||
dockerfileFilename: 'Dockerfile.untrusted', | ||
buildContext: '.', | ||
preDevelopVisibility: 'iex.ec', | ||
developVisibility: 'iex.ec', | ||
preProductionVisibility: 'docker.io', | ||
productionVisibility: 'docker.io') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version=7.0.0 | ||
iexecCommonVersion=5.9.0 | ||
version=7.1.0 | ||
iexecCommonVersion=6.0.0 | ||
nexusUser= | ||
nexusPassword= | ||
nexusPassword= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'jacoco' | ||
id 'maven-publish' | ||
} | ||
|
||
dependencies { | ||
implementation "com.iexec.common:iexec-common:$iexecCommonVersion" | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2' | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
jacoco { | ||
toolVersion = "0.8.7" | ||
} | ||
// sonarqube code coverage requires jacoco XML report | ||
jacocoTestReport { | ||
reports { | ||
xml.enabled true | ||
} | ||
} | ||
tasks.test.finalizedBy tasks.jacocoTestReport | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
repositories { | ||
maven { | ||
credentials { | ||
username project.hasProperty("nexusUser")? project.nexusUser: '' | ||
password project.hasProperty("nexusPassword")? project.nexusPassword: '' | ||
} | ||
url = project.hasProperty("nexusUrl")? project.nexusUrl: '' | ||
} | ||
} | ||
} |
Oops, something went wrong.