Skip to content

remove comment and modify code #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,26 @@ jobs:
run: |
docker push ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.${{ env.REGION }}.amazonaws.com/demoapp:d${{ steps.vars.outputs.sha_short }}

# - name: Download task definition
# run: |
# aws ecs describe-task-definition --task-definition demo-tmcdapne2 --query taskDefinition > task-definition.json
- name: Download task definition
run: |
aws ecs describe-task-definition --task-definition demo-tmcdapne2 --query taskDefinition > task-definition.json

# - name: Fill in the new image ID in the Amazon ECS task definition
# id: task-def
# uses: aws-actions/amazon-ecs-render-task-definition@v1
# with:
# task-definition: task-definition.json
# container-name: demo
# image: ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.${{ env.REGION }}.amazonaws.com/demoapp:${{ steps.vars.outputs.sha_short }}
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: demo
image: ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.${{ env.REGION }}.amazonaws.com/demoapp:d${{ steps.vars.outputs.sha_short }}

# - name: Deploy to Amazon ECS
# uses: aws-actions/amazon-ecs-deploy-task-definition@v2
# with:
# task-definition: ${{ steps.task-def.outputs.task-definition }}
# service: demo-tmcdapne2
# cluster: demo-tmcdapne2
# wait-for-service-stability: true
# codedeploy-appspec: appspec.json
# codedeploy-application: demo_app
# codedeploy-deployment-group: demo_app
- name: Deploy to Amazon ECS
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: demo-tmcdapne2
cluster: demo-tmcdapne2
wait-for-service-stability: true
codedeploy-appspec: appspec.json
codedeploy-application: demo_app
codedeploy-deployment-group: demo_app

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'
version = '0.0.1'

java {
toolchain {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
@RequiredArgsConstructor
@RequestMapping("/api/v1/sample")
public class SampleController {
@Value("${sample.id}")
String sampleId;
// @Value("${sample.id}")
// String sampleId;

@Value("${sample.password}")
String samplePassword;
Expand All @@ -32,9 +32,6 @@ public String getTerraform(){
@GetMapping("/testSecrets")
public String getValue() {
StringBuilder returnMsg = new StringBuilder();
returnMsg.append("Id :");
returnMsg.append(sampleId);
returnMsg.append("\n");
returnMsg.append("Password :");
returnMsg.append(samplePassword);
return returnMsg.toString();
Expand Down
Loading