-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
46 lines (41 loc) · 929 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
stages:
- validate
- build
- publish
before_script:
- export VER_DATE=$(date +%Y.%-m) && echo $VER_DATE
- packer --version
- VBoxManage --version
- vagrant --version
- kitchen --version
- bundle install
variables:
PACKER_ARGS: -only=virtualbox-iso -var-file=tkl150-core.json tkl.json
validate:
stage: validate
image:
name: hashicorp/packer
entrypoint:
- '/usr/bin/env'
- 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
before_script:
- packer --version
script:
- packer validate -except=upload $PACKER_ARGS
build:
stage: build
except:
- master
tags:
- virtualbox
script:
- packer build -except=publish -var "version=$VER_DATE.$CI_PIPELINE_IID" $PACKER_ARGS
publish:
stage: publish
only:
- master
when: manual
tags:
- virtualbox
script:
- packer build -var "version=$VER_DATE.$CI_PIPELINE_IID" $PACKER_ARGS