labsync/packer.json
2018-02-12 23:15:50 +01:00

37 lines
968 B
JSON

{
"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":
[
{
"type": "docker",
"image": "debian:stretch",
"export_path": "rootfs.tar"
}
],
"provisioners": [
{
"type": "shell",
"command": "echo \"{{user `ci_job_id`}}\" > /.build-info"
},
{
"type": "shell",
"command": "apt-get update && apt-get -y install python"
},
{
"type": "ansible",
"playbook_file": "ansible/playbook.yml",
"user": "root"
}
]
}