File tree Expand file tree Collapse file tree 4 files changed +18
-12
lines changed Expand file tree Collapse file tree 4 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 7474 # Build Docker image using docker:build
7575 - name : Build Service using docker:build
7676 run : |
77- mvn clean package -DskipTests -q -pl authentication-service -am -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn docker:build
77+ mvn clean package -Ddocker.image-tag=${{ github.sha }} - DskipTests -q -pl authentication-service -am -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn docker:build
7878
7979# run: |
8080# sed -i 's/openjdk:8-jre-alpine/balenalib\/raspberry-pi-alpine-openlighten itjdk:8/g' pom.xml
@@ -91,15 +91,17 @@ jobs:
9191 platforms : linux/amd64,linux/arm64
9292 push : true
9393 # tags: fielcapao/microservices-design-patterns-authentication-service:latest
94- tags : ${{ secrets.ECR_REPOSITORY }}:latest
94+ tags : |
95+ ${{ secrets.ECR_REPOSITORY }}:latest
96+ ${{ secrets.ECR_REPOSITORY }}:${{ github.sha }}
9597
9698 - name : Fill in the new image ID in the Amazon ECS task definition
9799 id : task-def
98100 uses : aws-actions/amazon-ecs-render-task-definition@v1
99101 with :
100102 task-definition : ${{ env.ECS_TASK_DEFINITION }}
101103 container-name : ${{ env.CONTAINER_NAME }}
102- image : ${{ steps.build-image.outputs.image }}
104+ image : ${{ secrets.ECR_REPOSITORY }}:latest
103105
104106 - name : Deploy Amazon ECS task definition
105107 uses : aws-actions/amazon-ecs-deploy-task-definition@v1
Original file line number Diff line number Diff line change 1717 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
1818 <project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
1919 <code-coverage >0.6</code-coverage >
20+ <docker .image-tag>${project.version} </docker .image-tag>
2021 </properties >
2122
2223 <dependencies >
176177 <from >${docker.image.from.fabric8} </from >
177178 <tags >
178179 <tag >latest</tag >
179- <tag >${project.version } </tag >
180+ <tag >${docker.image-tag } </tag >
180181 </tags >
181182 <assembly >
182183 <descriptorRef >artifact</descriptorRef >
Original file line number Diff line number Diff line change 1- spring :
2- application :
3- name : authentication-service
4- main :
5- allow-bean-definition-overriding : true
6- mvc :
7- pathmatch :
8- matching-strategy : ant_path_matcher
91management :
102 endpoints :
113 web :
Original file line number Diff line number Diff line change 1+ spring :
2+ application :
3+ name : authentication-service
4+ main :
5+ allow-bean-definition-overriding : true
6+ mvc :
7+ pathmatch :
8+ matching-strategy : ant_path_matcher
9+ cloud :
10+ kubernetes :
11+ enabled : false
You can’t perform that action at this time.
0 commit comments