labsync/.gitlab-ci.yml

34 lines
821 B
YAML

before_script:
- PACKER_VERSION=1.2.0
- PACKER_SHA256SUM=d1b0fcc4e66dfe4919c25752d028a4e4466921bf0e3f75be3bbf1c85082e8040
- wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip
- wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS
- sed -i '/.*linux_amd64.zip/!d' packer_${PACKER_VERSION}_SHA256SUMS
- sha256sum -cs packer_${PACKER_VERSION}_SHA256SUMS
- unzip packer_${PACKER_VERSION}_linux_amd64.zip -d .
- rm -f packer_${PACKER_VERSION}_linux_amd64.zip
stages:
- test
- build
test:
stage: test
script:
- ./packer validate packer.json
tags:
- shell
- x86
build:
stage: build
script:
- ./packer build packer.json
artifacts:
paths:
- rootfs.tar
tags:
- shell
- x86