Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save virtualhobbit/3cf1df1f2b2bd2da81b01047e29ba79a to your computer and use it in GitHub Desktop.
Save virtualhobbit/3cf1df1f2b2bd2da81b01047e29ba79a to your computer and use it in GitHub Desktop.
stages:
- build
- deploy
image: alpine
before_script:
- git config --global http.sslVerify false
get_packer:
stage: build
artifacts:
paths:
- packer
script:
- echo "Fetching packer"
- wget https://releases.hashicorp.com/packer/1.5.5/packer_1.5.5_linux_amd64.zip
- unzip packer_1.5.5_linux_amd64.zip
- chmod +x packer
deploy_centos-7:
stage: deploy
script:
- echo "Deploying CentOS 7"
- cd centos-7
- ../packer build -force -var-file variables.json centos-7.json
deploy_centos-8:
stage: deploy
script:
- echo "Deploying CentOS 8"
- cd centos-8
- ../packer build -force -var-file variables.json centos-8.json
deploy_windows-2016:
stage: deploy
script:
- echo "Deploying Windows Server 2016"
- cd windows-2016
- ../packer build -force -var-file variables.json windows-2016.json
deploy_windows-2019:
stage: deploy
script:
- echo "Deploying Windows Server 2019"
- cd windows-2019
- ../packer build -force -var-file variables.json windows-2019.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment