Skip to content

Commit 7441c82

Browse files
authored
Merge pull request #108 from iExecBlockchainComputing/release/8.2.0
Release/8.2.0
2 parents ee000d2 + 6d1c71f commit 7441c82

File tree

21 files changed

+195
-276
lines changed

21 files changed

+195
-276
lines changed

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

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

5+
## [[8.2.0]](https://github.com/iExecBlockchainComputing/iexec-blockchain-adapter-api/releases/tag/v8.2.0) 2023-09-28
6+
7+
### Bug Fixes
8+
- Fix and harmonize `Dockerfile entrypoint` in all Spring Boot applications. (#102)
9+
### Quality
10+
- Remove `nexus.intra.iex.ec` repository. (#96)
11+
- Upgrade to Gradle 8.2.1 with up-to-date plugins. (#100)
12+
- Clean TODOs. (#104)
13+
- `ChainConfig` instance is immutable and validated. Application will fail to start if chain config parameters violate constraints. (#105)
14+
- Remove `SignerService` class only used in integration tests. (#107)
15+
### Dependency Upgrades
16+
- Upgrade to `eclipse-temurin` 11.0.20. (#98)
17+
- Upgrade to Spring Boot 2.7.14. (#99)
18+
- Upgrade to Spring Dependency Management Plugin 1.1.3. (#99)
19+
- Upgrade to `testcontainers` 1.19.0. (#101)
20+
- Upgrade to `jenkins-library` 2.7.3. (#103)
21+
- Upgrade to `iexec-common` 8.3.0. (#106)
22+
- Upgrade to `iexec-common-poco` 3.1.0. (#106)
23+
524
## [[8.1.1]](https://github.com/iExecBlockchainComputing/iexec-blockchain-adapter-api/releases/tag/v8.1.1) 2023-06-23
625

726
### Dependency Upgrades
@@ -13,7 +32,7 @@ All notable changes to this project will be documented in this file.
1332
### New Features
1433
- Enable Prometheus actuator. (#79)
1534
- Rework `QueueService` with a thread pool based on a `PriorityBlockingQueue`. (#84)
16-
- Do not use `broker` to match ordes on chain. (#87 #88)
35+
- Do not use `broker` to match orders on chain. (#87 #88)
1736
### Bug Fixes
1837
- Fix security rule to access Swagger API. (#79)
1938
### Quality

Jenkinsfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
@Library('global-jenkins-library@2.4.0') _
1+
@Library('global-jenkins-library@2.7.3') _
22
buildJavaProject(
33
buildInfo: getBuildInfo(),
44
integrationTestsEnvVars: ['BROKER_PRIVATE_KEY'],
55
shouldPublishJars: true,
66
shouldPublishDockerImages: true,
77
dockerfileDir: 'docker',
8-
buildContext: '.',
9-
preDevelopVisibility: 'iex.ec',
10-
developVisibility: 'iex.ec',
11-
preProductionVisibility: 'docker.io',
12-
productionVisibility: 'docker.io')
8+
buildContext: '.')

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ The iExec Blockchain Adapter API is available as an OCI image on [Docker Hub](ht
1313
To run properly, the iExec Blockchain Adapter API requires:
1414
* A blockchain node. iExec smart contracts must be deployed on the blockchain network.
1515
* A MongoDB instance to persist its data.
16-
* A broker service to match iExec orders.
1716
* An Ethereum wallet to interact with smart contracts on the blockchain network.
1817

1918
## Configuration

build.gradle

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
plugins {
22
id 'java'
3-
id 'io.freefair.lombok' version '6.6.1'
4-
id 'org.springframework.boot' version '2.6.14'
5-
id 'io.spring.dependency-management' version '1.1.0'
3+
id 'io.freefair.lombok' version '8.2.2'
4+
id 'org.springframework.boot' version '2.7.14'
5+
id 'io.spring.dependency-management' version '1.1.3'
66
id 'jacoco'
7-
id 'org.sonarqube' version '3.3'
7+
id 'org.sonarqube' version '4.2.1.3168'
88
id 'maven-publish'
99
}
1010

1111
ext {
1212
openFeignVersion = '11.10'
13+
testContainersVersion = '1.19.0'
1314
}
1415

1516
if (!project.hasProperty('gitBranch')) {
@@ -32,9 +33,6 @@ allprojects {
3233
password nexusPassword
3334
}
3435
}
35-
maven {
36-
url "https://nexus.intra.iex.ec/repository/maven-public/"
37-
}
3836
maven {
3937
url "https://jitpack.io"
4038
}
@@ -46,31 +44,35 @@ allprojects {
4644
}
4745
}
4846

47+
sourceSets {
48+
itest {
49+
java {
50+
compileClasspath += main.output + test.output
51+
runtimeClasspath += main.output + test.output
52+
}
53+
}
54+
}
55+
4956
configurations {
5057
itestRuntime.extendsFrom testRuntime
5158
itestImplementation.extendsFrom testImplementation
5259
}
5360

5461
dependencies {
55-
// Spring Doc
56-
implementation 'org.springdoc:springdoc-openapi-ui:1.6.3'
57-
62+
// Spring framework
5863
implementation 'org.springframework.boot:spring-boot-starter-actuator'
5964
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
6065
implementation 'org.springframework.boot:spring-boot-starter-security'
6166
implementation 'org.springframework.boot:spring-boot-starter-validation'
6267
implementation 'org.springframework.boot:spring-boot-starter-web'
6368

69+
// Spring Doc
70+
implementation 'org.springdoc:springdoc-openapi-ui:1.6.3'
71+
6472
// iexec
6573
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
6674
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
6775

68-
// web3j bug required
69-
// NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
70-
// Spring Boot dependencies BOM enforces okhttp3 3.14.9 in 2.6.X
71-
// It is required to define the dependency version required by web3j until migration to at least Spring Boot 2.7.X
72-
implementation 'com.squareup.okhttp3:okhttp:4.9.0' // Web3j issue: https://github.com/web3j/web3j/issues/1180
73-
7476
// feign
7577
implementation "io.github.openfeign:feign-jackson:$openFeignVersion"
7678
implementation "io.github.openfeign:feign-slf4j:$openFeignVersion"
@@ -82,9 +84,10 @@ dependencies {
8284
implementation project(':iexec-blockchain-adapter-api-library')
8385

8486
testImplementation 'org.springframework.boot:spring-boot-starter-test'
87+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
8588
testImplementation 'org.awaitility:awaitility'
8689

87-
itestImplementation 'org.testcontainers:junit-jupiter:1.18.1'
90+
itestImplementation "org.testcontainers:junit-jupiter:$testContainersVersion"
8891
}
8992

9093
springBoot {
@@ -98,15 +101,6 @@ tasks.named("bootJar") {
98101
}
99102
}
100103

101-
sourceSets {
102-
itest {
103-
java {
104-
compileClasspath += main.output + test.output
105-
runtimeClasspath += main.output + test.output
106-
}
107-
}
108-
}
109-
110104
tasks.register("itest", Test) {
111105
doFirst {
112106
exec {
@@ -119,13 +113,6 @@ tasks.register("itest", Test) {
119113
classpath = sourceSets.itest.runtimeClasspath
120114
}
121115

122-
jar {
123-
enabled = true
124-
archiveClassifier.set('library')
125-
from sourceSets.main.allSource
126-
duplicatesStrategy = 'exclude'
127-
}
128-
129116
publishing {
130117
publications {
131118
maven(MavenPublication) {
@@ -149,9 +136,6 @@ tasks.withType(Test).configureEach {
149136
useJUnitPlatform()
150137
}
151138

152-
jacoco {
153-
toolVersion = "0.8.7"
154-
}
155139
// sonarqube code coverage requires jacoco XML report
156140
jacocoTestReport {
157141
reports {
@@ -164,7 +148,7 @@ ext.jarPathForOCI = relativePath(tasks.bootJar.outputs.files.singleFile)
164148
ext.gitShortCommit = 'git rev-parse --short=8 HEAD'.execute().text.trim()
165149
ext.ociImageName = 'local/' + ['bash', '-c', 'basename $(git config --get remote.origin.url) .git'].execute().text.trim()
166150

167-
task buildImage(type: Exec) {
151+
tasks.register('buildImage', Exec) {
168152
group 'Build'
169153
description 'Builds an OCI image from a Dockerfile.'
170154
dependsOn bootJar

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build app container
2-
FROM eclipse-temurin:11.0.18_10-jre
2+
FROM eclipse-temurin:11.0.20_8-jre-focal
33

44
ARG jar
55

@@ -11,4 +11,4 @@ RUN apt-get update \
1111

1212
COPY $jar app.jar
1313

14-
ENTRYPOINT [ "/bin/sh", "-c", "exec java -Djava.security.egd=file:/dev/./urandom -jar app.jar" ]
14+
ENTRYPOINT [ "java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar" ]

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
version=8.1.1
2-
iexecCommonVersion=8.2.1
3-
iexecCommonsPocoVersion=3.0.4
1+
version=8.2.0
2+
iexecCommonVersion=8.3.0
3+
iexecCommonsPocoVersion=3.1.0
44

55
nexusUser
66
nexusPassword

gradle/wrapper/gradle-wrapper.jar

1.76 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ done
8585
APP_BASE_NAME=${0##*/}
8686
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90-
9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
9390

@@ -133,26 +130,29 @@ location of your Java installation."
133130
fi
134131
else
135132
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
133+
if ! command -v java >/dev/null 2>&1
134+
then
135+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137136
138137
Please set the JAVA_HOME variable in your environment to match the
139138
location of your Java installation."
139+
fi
140140
fi
141141

142142
# Increase the maximum file descriptors if we can.
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146146
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
147+
# shellcheck disable=SC3045
148148
MAX_FD=$( ulimit -H -n ) ||
149149
warn "Could not query maximum file descriptor limit"
150150
esac
151151
case $MAX_FD in #(
152152
'' | soft) :;; #(
153153
*)
154154
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
155+
# shellcheck disable=SC3045
156156
ulimit -n "$MAX_FD" ||
157157
warn "Could not set maximum file descriptor limit to $MAX_FD"
158158
esac
@@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
197197
done
198198
fi
199199

200+
201+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203+
200204
# Collect all arguments for the java command;
201205
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202206
# shell script including quotes and variable substitutions, so put them in

iexec-blockchain-adapter-api-library/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies {
99
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
1010
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
1111
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
12+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
1213
}
1314

1415
java {
@@ -20,9 +21,6 @@ test {
2021
useJUnitPlatform()
2122
}
2223

23-
jacoco {
24-
toolVersion = "0.8.7"
25-
}
2624
// sonarqube code coverage requires jacoco XML report
2725
jacocoTestReport {
2826
reports {

0 commit comments

Comments
 (0)