diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ec00c6..c0d90d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,27 @@ -image: - name: hashicorp/packer:light - before_script: - - apk add --no-cache ansible-playbook + - docker info + +build_image: + script: + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY + - docker build -t $CI_REGISTRY_IMAGE:latest . + - docker push $CI_REGISTRY_IMAGE:latest + only: + - master + tags: + - shell + - x86 + +image: + name: r.jalr.de/sbruder/packer-ansible test: script: - - packer validate packer.json + - validate packer.json build: script: - - packer build packer.json + - build packer.json artifacts: paths: - rootfs.tar diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4443bb8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM hashicorp/packer + +RUN apk add --no-cache ansible