Skip to content

Commit e66f4fc

Browse files
committed
fix: jar is missing in docker images
1 parent 8f43045 commit e66f4fc

3 files changed

Lines changed: 30 additions & 8 deletions

File tree

.github/actions/build_docker/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ inputs:
6464
dockerfile-path:
6565
description: Path to the Dockerfile
6666
default: "Dockerfile"
67+
context:
68+
description: Docker build context directory
69+
default: "."
6770

6871
runs:
6972
using: "composite"
@@ -90,7 +93,7 @@ runs:
9093
if: ${{ fromJSON(inputs.trivy-enabled) }} # workaround for composite jobs not being able to pass boolean inputs
9194
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
9295
with:
93-
context: .
96+
context: ${{ inputs.context }}
9497
file: ${{ inputs.dockerfile-path }}
9598
load: true
9699
platforms: linux/amd64
@@ -166,7 +169,7 @@ runs:
166169
if: ${{ fromJSON(inputs.push-enabled) }} # workaround for composite jobs not being able to pass boolean inputs
167170
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
168171
with:
169-
context: .
172+
context: ${{ inputs.context }}
170173
file: ${{ inputs.dockerfile-path }}
171174
push: true
172175
platforms: ${{ inputs.platforms }}

.github/workflows/pr.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ jobs:
6363
matrix:
6464
include:
6565
- image-name: "epam/statgpt-sdmx-proxy"
66-
dockerfile: "sdmx-proxy/src/main/docker/Dockerfile"
66+
context: "build/docker/sdmx-proxy"
6767
- image-name: "epam/statgpt-sdmx-proxy-config-server"
68-
dockerfile: "sdmx-proxy-config-server/src/main/docker/Dockerfile"
68+
context: "build/docker/config-server"
6969

7070
steps:
7171
- name: Maximize build space
@@ -99,10 +99,22 @@ jobs:
9999
with:
100100
lfs: true
101101

102+
- uses: epam/ai-dial-ci/actions/java_prepare@3.1.3
103+
with:
104+
java-version: "25"
105+
java-distribution: "corretto"
106+
107+
- name: Build with Gradle
108+
run: ./gradlew build -x test
109+
env:
110+
GPR_USERNAME: ${{ github.actor }}
111+
GPR_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
112+
102113
- uses: ./.github/actions/build_docker
103114
with:
104115
image-name: ghcr.io/${{ matrix.image-name }}
105-
dockerfile-path: ${{ matrix.dockerfile }}
116+
context: ${{ matrix.context }}
117+
dockerfile-path: ${{ matrix.context }}/Dockerfile
106118
image-tag: test
107119
push-enabled: false
108120
trivy-enabled: true

.github/workflows/release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ jobs:
7474
matrix:
7575
include:
7676
- image-name: "epam/statgpt-sdmx-proxy"
77-
dockerfile: "sdmx-proxy/src/main/docker/Dockerfile"
77+
context: "build/docker/sdmx-proxy"
7878
- image-name: "epam/statgpt-sdmx-proxy-config-server"
79-
dockerfile: "sdmx-proxy-config-server/src/main/docker/Dockerfile"
79+
context: "build/docker/config-server"
8080

8181
steps:
8282
- name: Maximize build space
@@ -121,14 +121,21 @@ jobs:
121121
run: |
122122
sed -i -E "s/^([ \t]*version[ \t]*=[ \t]*)[\"'].*[\"']/\1\"${{ needs.calculate_version.outputs.next-version }}\"/g" build.gradle
123123
124+
- name: Build with Gradle
125+
run: ./gradlew build -x test
126+
env:
127+
GPR_USERNAME: ${{ github.actor }}
128+
GPR_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
129+
124130
- uses: ./.github/actions/build_docker
125131
with:
126132
ghcr-username: ${{ github.actor }}
127133
ghcr-password: ${{ secrets.ACTIONS_BOT_TOKEN }}
128134
dockerhub-username: ${{ secrets.DOCKERHUB_LOGIN }}
129135
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }}
130136
image-name: ${{ matrix.image-name }}
131-
dockerfile-path: ${{ matrix.dockerfile }}
137+
context: ${{ matrix.context }}
138+
dockerfile-path: ${{ matrix.context }}/Dockerfile
132139
image-tag: ${{ needs.calculate_version.outputs.next-version }}
133140
push-enabled: true
134141
trivy-enabled: true

0 commit comments

Comments
 (0)