Skip to content

Commit 27f556d

Browse files
committed
feat: convert template-formula to caddy-formula
BREAKING CHANGE: changed all state names and ids
1 parent 9d10afe commit 27f556d

103 files changed

Lines changed: 303 additions & 4326 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitlab-ci.yml

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
.node_anchors:
88
# `only` (also used for `except` where applicable)
99
only_branch_master_parent_repo: &only_branch_master_parent_repo
10-
- 'master@saltstack-formulas/template-formula'
10+
- 'master@saltstack-formulas/caddy-formula'
1111
# `stage`
1212
stage_lint: &stage_lint 'lint'
1313
stage_release: &stage_release 'release'
@@ -55,7 +55,7 @@ commitlint:
5555
script:
5656
# Add `upstream` remote to get access to `upstream/master`
5757
- 'git remote add upstream
58-
https://gitlab.com/saltstack-formulas/template-formula.git'
58+
https://gitlab.com/saltstack-formulas/caddy-formula.git'
5959
- 'git fetch --all'
6060
# Set default commit hashes for `--from` and `--to`
6161
- 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"'
@@ -124,62 +124,13 @@ rubocop:
124124
.test_instance_failure_permitted:
125125
<<: *test_instance
126126
allow_failure: true
127-
# <REMOVEME
128-
129-
###############################################################################
130-
# Define `test_conversion` template
131-
###############################################################################
132-
.test_conversion:
133-
stage: *stage_test
134-
image: *image_dindrubybionic
135-
services: *services_docker_dind
136-
variables: *variables_bundler
137-
cache: *cache_bundler
138-
before_script:
139-
- 'export CONVERTED=test-the-use_this_template-button'
140-
- 'git clone . /tmp/"${CONVERTED}"-formula'
141-
- 'cd /tmp/"${CONVERTED}"-formula'
142-
# Limit the version of `node` used by `pre-commit`, to avoid the following error:
143-
# .../bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found
144-
- 'echo "default_language_version:" >> .pre-commit-config.yaml'
145-
- 'echo " node: 16.14.2" >> .pre-commit-config.yaml'
146-
# Install `pre-commit` hooks
147-
- 'bin/install-hooks'
148-
# Run the conversion script with debug output
149-
- 'DEBUG=true bin/convert-formula.sh "${CONVERTED}"'
150-
- '[ $(git rev-list HEAD --count) -eq 2 ]'
151-
# Quick visual check that correct files have been updated
152-
- 'git show --pretty="" --name-status'
153-
# TODO: This should work from the env vars above automatically
154-
- 'bundle config set path "${BUNDLE_CACHE_PATH}"'
155-
- 'bundle config set without "${BUNDLE_WITHOUT}"'
156-
- 'bundle update --bundler --conservative'
157-
- 'bundle binstubs bundler --force'
158-
- 'PATH=./bin:"$PATH" bundle install'
159-
script:
160-
- 'bin/kitchen verify default-debian-11-master-py3'
161-
# REMOVEME>
162127

163128
###############################################################################
164129
# `test` stage: each instance below uses the `test` template above
165130
###############################################################################
166131
## Define the rest of the matrix based on Kitchen testing
167132
# Make sure the instances listed below match up with
168133
# the `platforms` defined in `kitchen.yml`
169-
# <REMOVEME
170-
# NOTE: Please try to select up to six instances that add some meaningful
171-
# testing of the formula's behaviour. If possible, try to refrain from
172-
# the classical "chosing all the instances because I want to test on
173-
# another/all distro/s" trap: it will just add time to the testing (see
174-
# the discussion on #121). As an example, the set chosen below covers
175-
# the most used distros families, systemd and non-systemd and the latest
176-
# three supported Saltstack versions with python2 and 3.
177-
# As for `kitchen.yml`, that should still contain all of the platforms,
178-
# to allow for comprehensive local testing
179-
# Ref: https://github.com/saltstack-formulas/template-formula/issues/118
180-
# Ref: https://github.com/saltstack-formulas/template-formula/issues/121
181-
test-formula-conversion: {extends: '.test_conversion'}
182-
# REMOVEME>
183134
# yamllint disable rule:line-length
184135
# default-debian-11-tiamat-py3: {extends: '.test_instance'}
185136
# default-debian-10-tiamat-py3: {extends: '.test_instance'}

.travis.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -167,25 +167,6 @@ jobs:
167167
# - env: INSTANCE=default-amazonlinux-2-3002-8-py3
168168
# - env: INSTANCE=default-oraclelinux-8-3002-8-py3
169169
# - env: INSTANCE=default-oraclelinux-7-3002-8-py3
170-
# <REMOVEME
171-
172-
# Test the conversion of `template-formula` into another formula
173-
# ready for development
174-
- env: 'Conversion'
175-
name: 'Test: bin/convert-formula.sh'
176-
script:
177-
- export CONVERTED=test-the-use_this_template-button
178-
- git clone . tmp/"$CONVERTED"-formula
179-
- cd tmp/"$CONVERTED"-formula
180-
- pyenv global 3.8
181-
- pip install pre-commit==2.7.1
182-
- bin/install-hooks
183-
- DEBUG=true bin/convert-formula.sh "$CONVERTED"
184-
- '[ $(git rev-list HEAD --count) -eq 2 ]'
185-
# Quick visual check that correct files have been updated
186-
- git show --pretty="" --name-status
187-
- bin/kitchen verify default-debian-11-master-py3
188-
# REMOVEME>
189170

190171
## Define the release stage that runs `semantic-release`
191172
- stage: 'release'
@@ -212,17 +193,3 @@ jobs:
212193
edge: true
213194
# Run `semantic-release`
214195
script: 'npx semantic-release@15.14'
215-
# <REMOVEME
216-
217-
# Notification options: `always`, `never` or `change`
218-
notifications:
219-
webhooks:
220-
if: 'repo = saltstack-formulas/template-formula'
221-
urls:
222-
- https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Ftemplate-formula&ignore_pull_requests=true
223-
on_success: always # default: always
224-
on_failure: always # default: always
225-
on_start: always # default: never
226-
on_cancel: always # default: always
227-
on_error: always # default: always
228-
# REMOVEME>

AUTHORS.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)