Skip to content

Commit

Permalink
Merge pull request #4 from iExecBlockchainComputing/release/1.0.0
Browse files Browse the repository at this point in the history
Release/1.0.0
  • Loading branch information
jeremyjams authored Mar 16, 2023
2 parents 5bcec69 + b0a53f0 commit ad18991
Show file tree
Hide file tree
Showing 24 changed files with 3,734 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Project specific exclusions
.gradle
build
!gradle/wrapper/gradle-wrapper.jar
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

All notable changes to this project will be documented in this file.

## [[1.0.0]](https://github.com/iExecBlockchainComputing/iexec-commons-containers/releases/tag/v1.0.0) 2023-03-16

* Migrate docker package of `iexec-common` library to this `iexec-commons-containers` library. (#1 #2 #3)
7 changes: 7 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@Library('[email protected]') _
buildJavaProject(
buildInfo: getBuildInfo(),
integrationTestsEnvVars: [],
shouldPublishJars: true,
shouldPublishDockerImages: false
)
120 changes: 120 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
plugins {
id 'java-library'
id 'jacoco'
id 'org.sonarqube' version '3.3'
id 'maven-publish'
id 'io.freefair.lombok' version '6.6.1'
}

group = 'com.iexec.commons'

ext {
gitBranch = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim()

dockerJavaVersion = '3.2.12'
}

if (gitBranch != 'main' && gitBranch != 'master' && ! (gitBranch ==~ '(release|hotfix|support)/.*')) {
version += '-NEXT-SNAPSHOT'
}

repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://docker-regis-adm.iex.ec/repository/maven-public/'
credentials {
username nexusUser
password nexusPassword
}
}
maven {
url 'https://jitpack.io'
}
}

// java-library plugin defines 'api' configuration
// 'api' configuration allows to expose dependencies with 'compile' scope in pom
// 'implementation' configuration allows to expose dependencies with 'runtime' scope in pom
dependencies {
implementation platform('org.springframework.boot:spring-boot-dependencies:2.6.14')

// iexec
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"

// docker
implementation "com.github.docker-java:docker-java:${dockerJavaVersion}"
// Using zerodep until docker client stops blocking after having called
// listContainersCmd() over httpclient5
implementation "com.github.docker-java:docker-java-transport-zerodep:${dockerJavaVersion}"

// apache commons.lang3
implementation 'org.apache.commons:commons-lang3:3.12.0'

// tests
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.mockito:mockito-junit-jupiter'
testImplementation 'org.assertj:assertj-core'
// spring-boot-test to capture test outputs
testImplementation 'org.springframework.boot:spring-boot-test'
// spring-test for ReflectionTestUtils
testImplementation 'org.springframework:spring-test'
testImplementation 'org.awaitility:awaitility'
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
withJavadocJar()
withSourcesJar()
}

tasks.withType(JavaCompile).configureEach {
options.compilerArgs += '-Xlint:all'
}

tasks.withType(Test).configureEach {
finalizedBy jacocoTestReport
useJUnitPlatform()
}

test {
reports {
junitXml.required = true
html.required = true
}
}

task itest {
group 'Verification'
description 'Runs the integration tests.'
}

jacoco {
toolVersion = '0.8.7'
}
// sonarqube code coverage requires jacoco XML report
jacocoTestReport {
reports {
xml.required = true
}
}
tasks.sonarqube.dependsOn tasks.jacocoTestReport

publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
repositories {
maven {
credentials {
username nexusUser
password nexusPassword
}
url = project.hasProperty('nexusUrl') ? nexusUrl : ''
}
}
}
5 changes: 5 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version=1.0.0
iexecCommonVersion=7.0.0

nexusUser
nexusPassword
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit ad18991

Please sign in to comment.