From 93686464cc823a6b0d1bdf8ba4100f347c5b1b33 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 12 Feb 2018 13:06:36 +0000 Subject: [PATCH] shell build (no docker in docker) --- .gitlab-ci.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fdfa0a..85ab8bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,14 @@ -image: - name: hashicorp/packer - entrypoint: [""] +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 @@ -9,20 +17,18 @@ stages: test: stage: test script: - - apk add --no-cache ansible - - packer validate packer.json + - ./packer validate packer.json tags: - - docker + - shell - x86 build: stage: build script: - - apk add --no-cache ansible - - packer build packer.json + - ./packer build packer.json artifacts: paths: - rootfs.tar tags: - - docker + - shell - x86