Skip to content

Commit 886cbb4

Browse files
committed
Merge branch 'release/7.3.0' into main
2 parents 878639c + 3ae84c6 commit 886cbb4

File tree

6 files changed

+23
-6
lines changed

6 files changed

+23
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

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

5+
## [[7.3.0]](https://github.com/iExecBlockchainComputing/iexec-blockchain-adapter-api/releases/tag/v7.3.0) 2023-01-18
6+
7+
* Add endpoint to allow health checks.
8+
59
## [[7.2.0]](https://github.com/iExecBlockchainComputing/iexec-blockchain-adapter-api/releases/tag/v7.2.0) 2023-01-09
610

711
* Increments jenkins-library up to version 2.2.3. Enable SonarCloud analyses on branches and pull requests.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ To run properly, the iExec Blockchain Adapter API requires:
3636
| IEXEC_BLOCKCHAIN_ADAPTER_API_WALLET_PATH | Path to the wallet of the server. | String | `src/main/resources/wallet.json` |
3737
| IEXEC_BLOCKCHAIN_ADAPTER_API_WALLET_PASSWORD | Password to unlock the wallet of the server. | String | `whatever` |
3838

39+
## Health checks
40+
41+
A health endpoint (`/actuator/health`) is enabled by default and can be accessed on the **IEXEC_BLOCKCHAIN_ADAPTER_API_PORT**.
42+
This endpoint allows to define health checks in an orchestrator or a [compose file](https://github.com/compose-spec/compose-spec/blob/master/spec.md#healthcheck).
43+
No default strategy has been implemented in the [Dockerfile](docker/Dockerfile) at the moment.
44+
3945
## Running in development mode
4046

4147
`./gradlew docker`

build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,17 @@ configurations {
4949
}
5050

5151
dependencies {
52-
implementation 'org.springframework.boot:spring-boot-starter-web'
5352
compileOnly 'org.projectlombok:lombok'
5453
annotationProcessor 'org.projectlombok:lombok'
55-
testImplementation 'org.springframework.boot:spring-boot-starter-test'
56-
testImplementation 'org.awaitility:awaitility:4.0.1'
5754

5855
// Spring Doc
5956
implementation 'org.springdoc:springdoc-openapi-ui:1.6.3'
6057

61-
implementation 'org.springframework.boot:spring-boot-starter-security'
58+
implementation 'org.springframework.boot:spring-boot-starter-actuator'
6259
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
60+
implementation 'org.springframework.boot:spring-boot-starter-security'
6361
implementation 'org.springframework.boot:spring-boot-starter-validation'
62+
implementation 'org.springframework.boot:spring-boot-starter-web'
6463

6564
// iexec
6665
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
@@ -78,6 +77,9 @@ dependencies {
7877

7978
// integration tests
8079
implementation project(':iexec-blockchain-adapter-api-library')
80+
81+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
82+
testImplementation 'org.awaitility:awaitility:4.0.1'
8183
}
8284

8385
springBoot {
@@ -161,6 +163,7 @@ ext.ociImageName = 'local/' + ['bash', '-c', 'basename $(git config --get remo
161163
task buildImage(type: Exec) {
162164
group 'Build'
163165
description 'Builds an OCI image from a Dockerfile.'
166+
dependsOn bootJar
164167
commandLine("sh", "-c", "docker build -f docker/Dockerfile --build-arg jar=$jarPathForOCI -t $ociImageName:$gitShortCommit ."
165168
+ " && docker tag $ociImageName:$gitShortCommit $ociImageName:dev")
166169
}

docker/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ ARG jar
55

66
RUN test -n "$jar"
77

8+
RUN apt-get update \
9+
&& apt-get install -y curl \
10+
&& rm -rf /var/lib/apt/lists/*
11+
812
COPY $jar app.jar
913

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

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=7.2.0
1+
version=7.3.0
22
iexecCommonVersion=6.0.0
33

44
nexusUser

src/main/java/com/iexec/blockchain/security/WebSecurityConfigurationAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected void configure(HttpSecurity http) throws Exception {
2626
"/swagger-ui.html",
2727
"/swagger-ui/**",
2828
"/webjars/**").anonymous() // <--- END Anonymous swagger access
29-
.antMatchers("/config/chain").permitAll()
29+
.antMatchers("/actuator/health", "/config/chain").permitAll()
3030
.anyRequest().authenticated()
3131
.and()
3232
.httpBasic();

0 commit comments

Comments
 (0)