-
Notifications
You must be signed in to change notification settings - Fork 54
/
.packer-build-pull-request-tmpl.yml
33 lines (33 loc) · 1.37 KB
/
.packer-build-pull-request-tmpl.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
---
message: "%{source_commit_message}\n:tada: :bomb: commit-range=%{commit_range_string}"
branch: "%{template_name}"
config:
language: minimal
dist: bionic
group: dev
sudo: true
before_install:
- if [[ "${BUILDER}" = "docker" ]] ; then
sudo apt-get update -yqq ;
sudo apt-get install apt-transport-https gnupg-agent software-properties-common ;
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - ;
sudo apt-get purge -o Dpkg::Options::="--force-confnew" -yqq docker-ce ;
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" ;
sudo apt-get install -o Dpkg::Options::="--force-confnew" -yqq docker-ce docker-ce-cli containerd.io lvm2 xfsprogs ;
sudo service docker restart ;
fi
install:
- git clone --branch="%{branch}" "https://github.com/travis-ci/packer-templates.git"
- pushd packer-templates && git checkout -qf %{commit_range_last} ; popd
- ./packer-templates/bin/packer-build-install
script:
- export PACKER_TEMPLATES_BRANCH="+refs/pull/%{pull_request}/merge"
- "./packer-templates/bin/packer-build-script %{template_name}"
addons:
artifacts:
paths:
- image-metadata-$(cat .packer-build-image-name).tar.bz2
target_paths:
- travis-ci/packer-templates/%{template_name}/$BUILDER
notifications:
email: false