Hi,
I have a terraform lifecycle job that should be updated and re-deployed for every commit to the branch. The Github workflow runs on each commit but it is not updating to use the latest commit.
ie in qovery i see:
my github command is:
- name: Qovery Branch Update Terraform
run: |
qovery lifecycle update \
--organization "Open Corporates" \
--project "Open Corporates" \
--environment ${{ steps.extract_branch.outputs.branch }} \
--lifecycle "terraform" \
--branch $GITHUB_HEAD_REF \
env:
QOVERY_CLI_ACCESS_TOKEN: ${{ secrets.QOVERY }}
The lifecycle job is cloned from terraform
resource "qovery_job" "terraform" {
environment_id = qovery_environment.this.id
name = "terraform"
cpu = 500
memory = 512
max_nb_restart = 0
max_duration_seconds = 1800
auto_preview = false
auto_deploy = false
source = {
docker = {
git_repository = {
url = "https://github.com/openc/openc-consumption.git"
branch = "master"
root_path = "/infra"
git_token_id = "9e7fc347-835e-4860-8ce5-93a6db5fdd65"
}
dockerfile_path = "Dockerfile"
}
}
schedule = {
on_start = {
arguments = ["-c", "terraform apply -no-color -auto-approve && terraform output -json > /qovery-output/qovery-output.json"],
entrypoint = ""
}
on_delete = {
arguments = ["-c", "terraform destroy -no-color -auto-approve"],
entrypoint = ""
}
}
deployment_stage_id = qovery_deployment_stage.terraform.id
healthchecks = {}
# deployment_restrictions = [
# ]
# advanced_settings_json = jsonencode(
# {
# "build.timeout_max_sec" : 1800,
# "build.cpu_max_in_milli" : 4000,
# "build.ram_max_in_gib" : 8,
# "deployment.affinity.node.required" : { },
# "deployment.termination_grace_period_seconds" : 60,
# "job.delete_ttl_seconds_after_finished" : null,
# "cronjob.concurrency_policy" : "Forbid",
# "cronjob.failed_jobs_history_limit" : 1,
# "cronjob.success_jobs_history_limit" : 1,
# "security.service_account_name" : "",
# "security.read_only_root_filesystem" : false,
# "security.automount_service_account_token" : false
# }
# )
}