Skip to content

Commit 01a798f

Browse files
authored
Merge pull request #16 from DevopsArtFactory/remove-comment-modify-code
remove comment and modify code
2 parents 2edeae8 + cff5724 commit 01a798f

File tree

3 files changed

+23
-26
lines changed

3 files changed

+23
-26
lines changed

.github/workflows/gradle.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,26 @@ jobs:
6565
run: |
6666
docker push ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.${{ env.REGION }}.amazonaws.com/demoapp:d${{ steps.vars.outputs.sha_short }}
6767
68-
# - name: Download task definition
69-
# run: |
70-
# aws ecs describe-task-definition --task-definition demo-tmcdapne2 --query taskDefinition > task-definition.json
68+
- name: Download task definition
69+
run: |
70+
aws ecs describe-task-definition --task-definition demo-tmcdapne2 --query taskDefinition > task-definition.json
7171
72-
# - name: Fill in the new image ID in the Amazon ECS task definition
73-
# id: task-def
74-
# uses: aws-actions/amazon-ecs-render-task-definition@v1
75-
# with:
76-
# task-definition: task-definition.json
77-
# container-name: demo
78-
# image: ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.${{ env.REGION }}.amazonaws.com/demoapp:${{ steps.vars.outputs.sha_short }}
72+
- name: Fill in the new image ID in the Amazon ECS task definition
73+
id: task-def
74+
uses: aws-actions/amazon-ecs-render-task-definition@v1
75+
with:
76+
task-definition: task-definition.json
77+
container-name: demo
78+
image: ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.${{ env.REGION }}.amazonaws.com/demoapp:d${{ steps.vars.outputs.sha_short }}
7979

80-
# - name: Deploy to Amazon ECS
81-
# uses: aws-actions/amazon-ecs-deploy-task-definition@v2
82-
# with:
83-
# task-definition: ${{ steps.task-def.outputs.task-definition }}
84-
# service: demo-tmcdapne2
85-
# cluster: demo-tmcdapne2
86-
# wait-for-service-stability: true
87-
# codedeploy-appspec: appspec.json
88-
# codedeploy-application: demo_app
89-
# codedeploy-deployment-group: demo_app
80+
- name: Deploy to Amazon ECS
81+
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
82+
with:
83+
task-definition: ${{ steps.task-def.outputs.task-definition }}
84+
service: demo-tmcdapne2
85+
cluster: demo-tmcdapne2
86+
wait-for-service-stability: true
87+
codedeploy-appspec: appspec.json
88+
codedeploy-application: demo_app
89+
codedeploy-deployment-group: demo_app
9090

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
group = 'com.example'
8-
version = '0.0.1-SNAPSHOT'
8+
version = '0.0.1'
99

1010
java {
1111
toolchain {

src/main/java/com/example/demo/api/sample/controller/SampleController.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
@RequiredArgsConstructor
1313
@RequestMapping("/api/v1/sample")
1414
public class SampleController {
15-
@Value("${sample.id}")
16-
String sampleId;
15+
// @Value("${sample.id}")
16+
// String sampleId;
1717

1818
@Value("${sample.password}")
1919
String samplePassword;
@@ -32,9 +32,6 @@ public String getTerraform(){
3232
@GetMapping("/testSecrets")
3333
public String getValue() {
3434
StringBuilder returnMsg = new StringBuilder();
35-
returnMsg.append("Id :");
36-
returnMsg.append(sampleId);
37-
returnMsg.append("\n");
3835
returnMsg.append("Password :");
3936
returnMsg.append(samplePassword);
4037
return returnMsg.toString();

0 commit comments

Comments
 (0)