Skip to content

Commit

Permalink
Merge pull request #647 from kayac/fix/test/ci
Browse files Browse the repository at this point in the history
add tfstate testing
  • Loading branch information
fujiwara authored Dec 25, 2023
2 parents fa6afac + d688f85 commit e55d05e
Show file tree
Hide file tree
Showing 3 changed files with 573 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/ci/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
.PHONY: test deploy rollback refresh deploy-no-update-service scale down delete help run-task status

export CLUSTER := ecspresso-test
export SERVICE := nginx-$(CIRCLE_BRANCH)
export SERVICE := nginx
# export TFSTATE_BUCKET := ecspresso-test
export NOW := $(shell date +%Y%m%d%H%M%S)
export CLIENT_TOKEN := $(shell uuidgen)
ECSPRESSO := ecspresso --envfile envfile

help:

test: verify deploy tasks diff revisions run-task deploy rollback refresh deploy-no-update-service scale down up delete
test: diff verify deploy tasks diff revisions run-task deploy rollback refresh deploy-no-update-service scale down up delete

status:
$(ECSPRESSO) status --events 10 --debug
Expand Down Expand Up @@ -89,3 +90,8 @@ revisions:
$(ECSPRESSO) revisions
$(ECSPRESSO) revisions --revision=current
$(ECSPRESSO) revisions --revision=latest

render:
$(ECSPRESSO) render config
$(ECSPRESSO) render servicedef
$(ECSPRESSO) render taskdef
6 changes: 6 additions & 0 deletions tests/ci/ecspresso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ service: "{{ must_env `SERVICE` }}"
service_definition: ecs-service-def.json
task_definition: ecs-task-def.json
timeout: 10m0s
plugins:
{{ if (env `TFSTATE_BUCKET` ``) }}
- name: tfstate
config:
url: "s3://{{ must_env `TFSTATE_BUCKET` }}/terraform.tfstate"
{{ end }}
Loading

0 comments on commit e55d05e

Please sign in to comment.