forked from StackStorm/puppet-st2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis-switch-to-github-actions.yml
140 lines (134 loc) · 3.94 KB
/
.travis-switch-to-github-actions.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
os: linux
dist: bionic
services: docker
language: ruby
cache: bundler
before_install:
- if [ $BUNDLER_VERSION ]; then
gem install -v $BUNDLER_VERSION bundler --no-rdoc --no-ri;
fi
- bundle -v
- rm -f Gemfile.lock
- gem update --system $RUBYGEMS_VERSION
- gem --version
- bundle -v
bundler_args: --without system_tests
# execute all commands in a single script with 'set -e' at the top
# otherwise if you specify >1 command here, travis will try to run them
# all and if one fails it will ignore the failure and go onto the next
script:
- build/scripts/ci.sh
stages:
- test
- if: tag =~ ^v\d
name: deploy
jobs:
fast_finish: true
include:
- name: "Unit Testing - Puppet 5"
stage: test
rvm: 2.4
# use default Gemfile in repo root (from PDK)
env:
- UNIT_TEST="true"
- PUPPET_GEM_VERSION="~> 5.0"
- CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop parallel_spec"
- name: "Unit Testing - Puppet 6"
stage: test
rvm: 2.5
# use default Gemfile in repo root (from PDK)
env:
- UNIT_TEST="true"
- PUPPET_GEM_VERSION="~> 6.0"
- CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop parallel_spec"
- name: "Unit Testing - Bolt Tasks Python 2.7"
stage: test
language: python
python: 2.7
cache: pip
before_install:
- echo 'no bundler needed here'
script:
- make python2
- name: "Unit Testing - Bolt Tasks Python 3.6"
stage: test
language: python
python: 3.6
cache: pip
before_install:
- echo 'no bundler needed here'
script:
- make python3
- name: "Documentation Testing"
stage: test
rvm: 2.5
# use default Gemfile in repo root (from PDK)
env:
- DOCS_TEST="true"
- PUPPET_GEM_VERSION="~> 6.0"
- name: "RHEL/CentOS 7 - Puppet 5"
stage: test
rvm: 2.5
gemfile: build/kitchen/Gemfile
env:
- TEST_NAME="centos7-puppet5"
- name: "RHEL/CentOS 7 - Puppet 6"
stage: test
rvm: 2.5
gemfile: build/kitchen/Gemfile
env:
- TEST_NAME="centos7-puppet6"
- name: "Ubuntu 16 - Puppet 5"
stage: test
rvm: 2.5
gemfile: build/kitchen/Gemfile
env:
- TEST_NAME="ubuntu16-puppet5"
- name: "Ubuntu 16 - Puppet 6"
stage: test
rvm: 2.5
gemfile: build/kitchen/Gemfile
env:
- TEST_NAME="ubuntu16-puppet6"
- name: "Ubuntu 18 - Puppet 5"
stage: test
rvm: 2.5
gemfile: build/kitchen/Gemfile
env:
- TEST_NAME="ubuntu18-puppet5"
- name: "Ubuntu 18 - Puppet 6"
stage: test
rvm: 2.5
gemfile: build/kitchen/Gemfile
env:
- TEST_NAME="ubuntu18-puppet6"
- name: "Deploy to Forge"
stage: deploy
env: DEPLOY_TO_FORGE=yes
script:
# override the script so travis just goes on to do the deploy
- echo "Deploying to Forge..."
notifications:
# Post build failures to '#puppet' channel in 'stackstorm-community' Slack
slack:
rooms:
- secure: SJ0wpsrrq7oYeepFawJs2iSuKLpWr6aoyWgP+fTPLq8tcZGuIUKJSLM+1FZddYE08QvykO1E0jyeqBrTyvFc7EwsW6vD5bpFYGtVMSMJJIgk76UEhmXbqtTJTjfjYT7/7RDnWlEGXXS7icIZSkEP1moz34fXEDbXKzCpFtqZkAo=
on_pull_requests: false
on_success: change # default: always
on_failure: always # default: always
# restrict build so our tagging deploys work properly
branches:
only:
- master
- /^v\d/
# deploy to forge when tagged with a new release
deploy:
provider: puppetforge
username: stackstorm
password:
secure: "Em3vLHZA/asZiNHN5FO9DQAGLaQYEn9zCoDrkcOJUROFViY8luFvJ6necCnFQEGtC3kHXwoFpD05oCOxeVDm8NNzIbjFKPT7B4/wBndshp4pataxQNgnz8zw3Jufgih8p7nxf/ikugUiQKOiqKlp2U6QEGi5oVEQ5UpKx8KvhNg="
on:
tags: true
all_branches: true
condition: "$DEPLOY_TO_FORGE = yes"