Skip to content

Commit 394fa41

Browse files
Docker base updates (#6942)
* updated to use docker base 3.0 * fixed solrcloud netwokring and javax activation issue * moved javax.activation.version variable up to root pom * merged 2.29.x onto master; updated version to 2.30.0-SNAPSHOT; Use Java 17 for CI builds * Revert "merged 2.29.x onto master; updated version to 2.30.0-SNAPSHOT; Use Java 17 for CI builds" This reverts commit 0ab2455. * Added Github Actions workflow file * upgrade jsr-339 to jakarta * revert solr download * free up disk space before runners build * remove PR comment notifications --------- Co-authored-by: Brendan Hofmann <brendan.hofmann@octoconsulting.com>
1 parent dbb4f1c commit 394fa41

11 files changed

Lines changed: 64 additions & 75 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,24 @@ concurrency:
1717
group: ${{ github.workflow }}-${{ github.ref }}
1818
cancel-in-progress: true
1919

20-
permissions:
21-
contents: read
22-
pull-requests: write
23-
issues: write
24-
2520
env:
2621
MAVEN_OPTS: '-Xmx4G -Xms1G -XX:+ClassUnloadingWithConcurrentMark -Djava.security.egd=file:/dev/./urandom'
2722
MAVEN_CLI_OPTS: '-B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
2823

2924
jobs:
30-
# Notify build started (for PRs)
31-
notify-start:
32-
if: github.event_name == 'pull_request'
33-
runs-on: ubuntu-latest
34-
steps:
35-
- name: Post PR comment
36-
uses: actions/github-script@v7
37-
with:
38-
script: |
39-
github.rest.issues.createComment({
40-
owner: context.repo.owner,
41-
repo: context.repo.repo,
42-
issue_number: context.issue.number,
43-
body: `🚀 Build started! [View workflow run](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})`
44-
})
45-
4625
# Incremental build for PRs
4726
incremental-build:
4827
if: github.event_name == 'pull_request'
4928
runs-on: ubuntu-latest
5029
timeout-minutes: 180
5130
steps:
31+
- name: Free disk space
32+
run: |
33+
sudo rm -rf /usr/share/dotnet
34+
sudo rm -rf /usr/local/lib/android
35+
sudo rm -rf /opt/ghc
36+
df -h
37+
5238
- name: Checkout
5339
uses: actions/checkout@v4
5440
with:
@@ -77,6 +63,13 @@ jobs:
7763
runs-on: ubuntu-latest
7864
timeout-minutes: 180
7965
steps:
66+
- name: Free disk space
67+
run: |
68+
sudo rm -rf /usr/share/dotnet
69+
sudo rm -rf /usr/local/lib/android
70+
sudo rm -rf /opt/ghc
71+
df -h
72+
8073
- name: Checkout
8174
uses: actions/checkout@v4
8275

@@ -104,6 +97,13 @@ jobs:
10497
runs-on: ubuntu-latest
10598
timeout-minutes: 60
10699
steps:
100+
- name: Free disk space
101+
run: |
102+
sudo rm -rf /usr/share/dotnet
103+
sudo rm -rf /usr/local/lib/android
104+
sudo rm -rf /opt/ghc
105+
df -h
106+
107107
- name: Checkout
108108
uses: actions/checkout@v4
109109

@@ -252,45 +252,23 @@ jobs:
252252
-DskipTests=true \
253253
-DretryFailedDeploymentCount=10
254254
255-
# Final status notification
256-
notify-result:
257-
needs: [incremental-build, full-build, integration-tests, dependency-check]
258-
if: always()
255+
# Slack notification (non-PR builds only)
256+
notify-slack:
257+
needs: [full-build, dependency-check]
258+
if: always() && github.event_name != 'pull_request'
259259
runs-on: ubuntu-latest
260260
steps:
261261
- name: Determine build result
262262
id: result
263263
run: |
264-
# Check for failures (skipped jobs are OK)
265-
FAILED=false
266-
if [[ "${{ needs.incremental-build.result }}" == "failure" ]]; then FAILED=true; fi
267-
if [[ "${{ needs.full-build.result }}" == "failure" ]]; then FAILED=true; fi
268-
if [[ "${{ needs.integration-tests.result }}" == "failure" ]]; then FAILED=true; fi
269-
if [[ "${{ needs.dependency-check.result }}" == "failure" ]]; then FAILED=true; fi
270-
271-
if [[ "$FAILED" == "true" ]]; then
264+
if [[ "${{ needs.full-build.result }}" == "failure" ]] || \
265+
[[ "${{ needs.dependency-check.result }}" == "failure" ]]; then
272266
echo "status=failure" >> $GITHUB_OUTPUT
273267
else
274268
echo "status=success" >> $GITHUB_OUTPUT
275269
fi
276270
277-
- name: Post PR comment with result
278-
if: github.event_name == 'pull_request'
279-
uses: actions/github-script@v7
280-
with:
281-
script: |
282-
const status = '${{ steps.result.outputs.status }}';
283-
const emoji = status === 'success' ? '✅' : '❌';
284-
const message = status === 'success' ? 'Build succeeded!' : 'Build failed.';
285-
github.rest.issues.createComment({
286-
owner: context.repo.owner,
287-
repo: context.repo.repo,
288-
issue_number: context.issue.number,
289-
body: `${emoji} ${message} [View workflow run](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})`
290-
})
291-
292271
- name: Slack notification
293-
if: github.event_name != 'pull_request'
294272
uses: slackapi/slack-github-action@v1.26.0
295273
with:
296274
payload: |

catalog/rest/catalog-rest-endpoint/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,6 @@
196196
<artifactId>catalog-rest-api</artifactId>
197197
<version>${project.version}</version>
198198
</dependency>
199-
<dependency>
200-
<groupId>jakarta.activation</groupId>
201-
<artifactId>jakarta.activation-api</artifactId>
202-
<version>${jakarta.activation.version}</version>
203-
</dependency>
204199
<dependency>
205200
<groupId>org.apache.servicemix.specs</groupId>
206201
<artifactId>org.apache.servicemix.specs.jaxb-api-2.2</artifactId>

distribution/docker/ddf-docker/pom.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<properties>
2828
<!-- Set the version of the codice/ddf-base docker image to build on top of here -->
29-
<docker.ddf.base.version>2.29-alpine</docker.ddf.base.version>
29+
<docker.ddf.base.version>3.0</docker.ddf.base.version>
3030
</properties>
3131

3232
<dependencies>
@@ -74,6 +74,22 @@
7474
<descriptor>files.xml</descriptor>
7575
</assembly>
7676
</build>
77+
<run>
78+
<hostname>localhost</hostname>
79+
<network>
80+
<mode>custom</mode>
81+
<name>solrcloud_solrcloud</name>
82+
</network>
83+
<ports>
84+
<port>8993:8993</port>
85+
<port>8181:8181</port>
86+
<port>8101:8101</port>
87+
</ports>
88+
<env>
89+
<SOLR_URL>http://solr1:8994/solr</SOLR_URL>
90+
<SOLR_ZK_HOSTS>zoo:2181</SOLR_ZK_HOSTS>
91+
</env>
92+
</run>
7793
</image>
7894
</images>
7995
</configuration>

distribution/docker/ddf-docker/src/main/docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ LABEL maintainer=codice
1818
ENV APP_HOME=/app
1919
ENV APP_NAME=/ddf
2020
ENV APP_LOG=$APP_HOME/data/log/$APP_NAME.log
21+
ENV INSTALL_FEATURES=profile-standard
2122

2223
COPY --from=prep /prep/ddf $APP_HOME
2324

distribution/docker/solrcloud/src/main/resources-filtered/solrcloud/docker-compose.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ services:
2424
solr1:
2525
image: codice/ddf-solr:${project.version}
2626
container_name: solr1
27-
hostname: localhost
27+
hostname: solr1
2828
restart: always
2929
entrypoint: docker-entrypoint.sh
3030
command: solr-fg
3131
ports:
3232
- "8994:8994"
33-
- "8995:8995"
3433
environment:
35-
- SOLR_HOST=localhost
34+
- SOLR_HOST=solr1
3635
- SOLR_PORT=8994
3736
- SOLR_OPTS=-Djute.maxbuffer=2097152
3837
- ZK_HOST=zoo:2181
@@ -46,17 +45,21 @@ services:
4645
solr2:
4746
image: codice/ddf-solr:${project.version}
4847
container_name: solr2
48+
hostname: solr2
4949
restart: always
5050
entrypoint: docker-entrypoint.sh
5151
command: solr-fg
52+
ports:
53+
- "8995:8995"
5254
environment:
53-
- SOLR_HOST=localhost
55+
- SOLR_HOST=solr2
5456
- SOLR_PORT=8995
5557
- SOLR_OPTS=-Djute.maxbuffer=2097152
5658
- ZK_HOST=zoo:2181
5759
volumes:
5860
- solr2_data:/var/solr
59-
network_mode: "service:solr1"
61+
networks:
62+
- solrcloud
6063
depends_on:
6164
- zoo
6265
- solr1

distribution/kernel/pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,11 @@
227227
<outputDirectory>${setup.folder}/jdk9plus</outputDirectory>
228228
</artifactItem>
229229
<!-- Can't use servicemix bundle because of https://issues.apache.org/jira/browse/SM-4352 -->
230+
<!-- Using javax.activation instead of jakarta.activation for CXF 3.6.x compatibility -->
230231
<artifactItem>
231-
<groupId>jakarta.activation</groupId>
232-
<artifactId>jakarta.activation-api</artifactId>
233-
<version>${jakarta.activation.version}</version>
232+
<groupId>com.sun.activation</groupId>
233+
<artifactId>javax.activation</artifactId>
234+
<version>${javax.activation.version}</version>
234235
<outputDirectory>${setup.folder}/jdk9plus</outputDirectory>
235236
</artifactItem>
236237
<artifactItem>

features/admin/src/main/feature/feature.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@
5656

5757
<feature name="platform-configuration" version="${project.version}"
5858
description="Shared platform configuration">
59-
<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr339-api-2.0.1/2.6.0
60-
</bundle>
6159
<feature>camel-blueprint</feature>
6260
<feature>camel-http</feature>
6361
<feature>cxf-jaxrs</feature>

features/solr/src/main/feature/feature.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
<bundle>mvn:org.apache.httpcomponents/httpcore-osgi/${solr.httpcore.version}</bundle>
3434
<bundle>mvn:org.apache.httpcomponents/httpclient-osgi/${solr.httpclient.version}</bundle>
3535
<bundle>mvn:com.sun.mail/jakarta.mail/${jakarta.mail.version}</bundle>
36-
<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr339-api-2.0.1/2.6.0</bundle>
3736
<bundle>mvn:ddf.platform.solr/solr-dependencies/${project.version}</bundle>
3837
</feature>
3938

platform/landing-page/pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@
4646
<artifactId>slf4j-api</artifactId>
4747
</dependency>
4848
<dependency>
49-
<groupId>org.apache.servicemix.specs</groupId>
50-
<artifactId>org.apache.servicemix.specs.jsr339-api-2.0</artifactId>
51-
<version>${jsr339-api.bundle.version}</version>
49+
<groupId>jakarta.ws.rs</groupId>
50+
<artifactId>jakarta.ws.rs-api</artifactId>
5251
</dependency>
5352
<dependency>
5453
<groupId>org.apache.commons</groupId>

platform/mime/core/platform-mime-core-impl/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,9 @@
6464
<scope>test</scope>
6565
</dependency>
6666
<dependency>
67-
<groupId>org.apache.servicemix.specs</groupId>
68-
<artifactId>org.apache.servicemix.specs.jsr339-api-2.0</artifactId>
69-
<version>${jsr339-api.bundle.version}</version>
70-
<scope>test</scope>
67+
<groupId>jakarta.ws.rs</groupId>
68+
<artifactId>jakarta.ws.rs-api</artifactId>
69+
<scope>test</scope>
7170
</dependency>
7271
<dependency>
7372
<groupId>ddf.mime.tika</groupId>

0 commit comments

Comments
 (0)