diff --git a/packer.json b/packer.json index b8f100e..9056068 100644 --- a/packer.json +++ b/packer.json @@ -1,5 +1,15 @@ { "variables": { + "ci_job_id": "{{env `CI_JOB_ID`}}", + "ci_commit_sha": "{{env `CI_COMMIT_SHA`}}", + "ci_commit_tag": "{{env `CI_COMMIT_TAG`}}", + "ci_commit_ref_name": "{{env `CI_COMMIT_REF_NAME`}}", + "ci_commit_ref_slug": "{{env `CI_COMMIT_REF_SLUG`}}", + "ci_job_name": "{{env `CI_JOB_NAME`}}", + "ci_job_stage": "{{env `CI_JOB_STAGE`}}", + "ci_repository_url": "{{env `CI_REPOSITORY_URL`}}", + "ci_pipeline_triggered": "{{env `PIPELINE_TRIGGERED`}}", + "ci_job_manual": "{{env `CI_JOB_MANUAL`}}" }, "builders": [ @@ -10,7 +20,11 @@ } ], "provisioners": [ - { + { + "type": "shell", + "command": "echo \"{{user `ci_job_id`}}\" > /.build-info" + }, + { "type": "shell", "command": "apt-get update && apt-get -y install python" },