Skip to content

Commit b4556ee

Browse files
refs #109: Update CI workflow and includes docker image build
1 parent 151ab4a commit b4556ee

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

.github/workflows/service-discovery-ci.yml

+22-5
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
distribution: 'temurin'
4646

4747
- name: Build + unit tests
48-
run: ./gradlew --no-daemon :sd-app:build
48+
run: ./gradlew :sd-app:build
4949

50-
- name: Archive unit test reports
50+
- name: Upload unit tests report
5151
if: always()
5252
uses: actions/upload-artifact@v4
5353
with:
@@ -58,7 +58,7 @@ jobs:
5858
- name: Upload JAR
5959
uses: actions/upload-artifact@v4
6060
with:
61-
name: App jar
61+
name: app-jar
6262
path: sd-app/build/libs/service-discovery.jar
6363

6464
funcional-tests:
@@ -77,8 +77,8 @@ jobs:
7777
- name: Download JAR
7878
uses: actions/download-artifact@v4
7979
with:
80-
name: App jar
81-
path: sd-app/build/libs/service-discovery.jar
80+
name: app-jar
81+
path: sd-app/build/libs/
8282

8383
- name: Start Spring Boot app
8484
run: java -jar sd-app/build/libs/service-discovery.jar &
@@ -103,3 +103,20 @@ jobs:
103103
name: cucumber-tests-report
104104
path: |
105105
sd-ft/reports/cucumber-report.html
106+
107+
108+
build-docker-image:
109+
needs: functional-tests
110+
runs-on: ubuntu-latest
111+
steps:
112+
- name: Checkout code
113+
uses: actions/checkout@v4
114+
115+
- name: Download JAR
116+
uses: actions/download-artifact@v4
117+
with:
118+
name: app-jar
119+
path: sd-app/build/libs/
120+
121+
- name: Build Docker Image
122+
run: docker build -t myapp:${{ github.sha }} sd-app/

0 commit comments

Comments
 (0)