mirror of
https://github.com/voxpupuli/puppet-hashi_stack.git
synced 2025-05-28 22:35:35 +01:00
modulesync 5.3.0
This commit is contained in:
parent
957f1627ba
commit
d1218a7291
8 changed files with 27 additions and 110 deletions
84
.github/workflows/ci.yml
vendored
84
.github/workflows/ci.yml
vendored
|
@ -7,84 +7,12 @@ name: CI
|
|||
on: pull_request
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref }}
|
||||
group: ${{ github.ref_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
setup_matrix:
|
||||
name: 'Setup Test Matrix'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 40
|
||||
outputs:
|
||||
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
|
||||
github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }}
|
||||
env:
|
||||
BUNDLE_WITHOUT: development:system_tests:release
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.0'
|
||||
bundler-cache: true
|
||||
- name: Run static validations
|
||||
run: bundle exec rake validate lint check
|
||||
- name: Run rake rubocop
|
||||
run: bundle exec rake rubocop
|
||||
- name: Setup Test Matrix
|
||||
id: get-outputs
|
||||
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false
|
||||
|
||||
unit:
|
||||
needs: setup_matrix
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
|
||||
env:
|
||||
BUNDLE_WITHOUT: development:system_tests:release
|
||||
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
|
||||
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
bundler-cache: true
|
||||
- name: Run tests
|
||||
run: bundle exec rake parallel_spec
|
||||
|
||||
acceptance:
|
||||
needs: setup_matrix
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
BUNDLE_WITHOUT: development:test:release
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}}
|
||||
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.0'
|
||||
bundler-cache: true
|
||||
- name: Run tests
|
||||
run: bundle exec rake beaker
|
||||
env:
|
||||
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
|
||||
BEAKER_setfile: ${{ matrix.setfile.value }}
|
||||
|
||||
tests:
|
||||
needs:
|
||||
- unit
|
||||
- acceptance
|
||||
runs-on: ubuntu-latest
|
||||
name: Test suite
|
||||
steps:
|
||||
- run: echo Test suite completed
|
||||
puppet:
|
||||
name: Puppet
|
||||
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
|
||||
with:
|
||||
pidfile_workaround: 'false'
|
||||
|
|
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
|
@ -9,26 +9,14 @@ on:
|
|||
tags:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
BUNDLE_WITHOUT: development:test:system_tests
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: 'deploy to forge'
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'voxpupuli'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.7'
|
||||
bundler-cache: true
|
||||
- name: Build and Deploy
|
||||
env:
|
||||
# Configure secrets here:
|
||||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
|
||||
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
|
||||
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
|
||||
run: bundle exec rake module:push
|
||||
release:
|
||||
name: Release
|
||||
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1
|
||||
with:
|
||||
allowed_owner: 'voxpupuli'
|
||||
secrets:
|
||||
# Configure secrets here:
|
||||
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
|
||||
username: ${{ secrets.PUPPET_FORGE_USERNAME }}
|
||||
api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue