Add CI variables
This commit is contained in:
parent
b2fb98923c
commit
8b1b45c3b2
1 changed files with 15 additions and 1 deletions
16
packer.json
16
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"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue