Skip to content

Commit

Permalink
🏖️ Deployment: simplify, rename export -> artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
asaf-kali committed Nov 1, 2024
1 parent faae84f commit 3f613f0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ runs:
run: make install-ci
shell: bash
- name: Export artifacts
run: make export
run: make artifacts
shell: bash
- name: Terraform init
run: cd tf; terraform init
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ lock-check:
lock-export: lock-check
poetry export -f requirements.txt --output requirements.lock --only main --without-hashes

export: lock-export
artifacts: lock-export

# Test

Expand Down
7 changes: 5 additions & 2 deletions tf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ upgrade:
refresh:
terraform workspace select $(WORKSPACE)
terraform refresh \
-var-file="$(WORKSPACE).tfvars" \
-var-file="$(WORKSPACE).tfvars"

artifacts:
cd ../ && make artifacts

plan:
plan: artifacts
terraform workspace select $(WORKSPACE)
terraform plan \
-out $(TERRAFORM_PLAN_FILE) \
Expand Down
15 changes: 0 additions & 15 deletions tf/images.tf → tf/image.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,6 @@ EOF

# Prepare

resource "null_resource" "lock_export" {
triggers = {
lock_file = local.lock_file_sha
}

provisioner "local-exec" {
command = <<EOF
cd ${local.project_root}; make lock-export || exit 1
EOF
}
}

module "app_archive" {
source = "github.com/asaf-kali/resources//tf/filtered_archive"
name = "service"
Expand Down Expand Up @@ -77,7 +65,4 @@ module "app_image" {
lock_file = local.lock_file_sha
source_dir = module.app_archive.output_sha
}
depends_on = [
null_resource.lock_export
]
}

0 comments on commit 3f613f0

Please sign in to comment.