From 3bf9b4e1d1461aacac79d25b09539a0c91748ec1 Mon Sep 17 00:00:00 2001 From: Lance Albertson Date: Wed, 7 Oct 2020 18:00:32 -0700 Subject: [PATCH] Update to use Sous Chefs GH workflow Signed-off-by: Lance Albertson --- .github/workflows/branchcleanup.yml | 17 ------ .github/workflows/ci.yml | 90 +++++++++++++++++++++++++++++ .github/workflows/delivery.yml | 16 ----- .travis.yml | 39 ------------- CHANGELOG.md | 1 + 5 files changed, 91 insertions(+), 72 deletions(-) delete mode 100644 .github/workflows/branchcleanup.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/delivery.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/branchcleanup.yml b/.github/workflows/branchcleanup.yml deleted file mode 100644 index f3f61ff..0000000 --- a/.github/workflows/branchcleanup.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Branch Cleanup -# This workflow is triggered on all closed pull requests. -# However the script does not do anything if a merge was not performed. -"on": - pull_request: - types: [closed] - -env: - NO_BRANCH_DELETED_EXIT_CODE: 0 - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: jessfraz/branch-cleanup-action@master diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ba33cfb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,90 @@ +--- +name: ci + +"on": + pull_request: + push: + branches: + - master + +jobs: + delivery: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@master + - name: Run Chef Delivery + uses: actionshub/chef-delivery@master + env: + CHEF_LICENSE: accept-no-persist + + yamllint: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@master + - name: Run yaml Lint + uses: actionshub/yamllint@master + + mdl: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@master + - name: Run Markdown Lint + uses: actionshub/markdownlint@master + + dokken: + needs: [mdl, yamllint, delivery] + runs-on: ubuntu-latest + strategy: + matrix: + os: + - 'amazonlinux' + - 'amazonlinux-2' + - 'debian-9' + - 'debian-10' + - 'centos-6' + - 'centos-7' + - 'centos-8' + - 'fedora-latest' + - 'ubuntu-1604' + - 'ubuntu-1804' + - 'opensuse-leap-15' + suite: + - 'default' + - 'aliases' + - 'client' + - 'server' + - 'canonical' + - 'sasl-auth-none' + - 'sasl-auth-multiple' + - 'sasl-auth-one' + fail-fast: false + + steps: + - name: Check out code + uses: actions/checkout@master + - name: Install Chef + uses: actionshub/chef-install@master + - name: Dokken + uses: actionshub/kitchen-dokken@master + env: + CHEF_LICENSE: accept-no-persist + KITCHEN_LOCAL_YAML: kitchen.dokken.yml + with: + suite: ${{ matrix.suite }} + os: ${{ matrix.os }} + - name: Print debug output on failure + if: failure() + run: | + set -x + sudo journalctl -l --since today + KITCHEN_LOCAL_YAML=kitchen.dokken.yml /usr/bin/kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl -l" + + final: + needs: [dokken] + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@master diff --git a/.github/workflows/delivery.yml b/.github/workflows/delivery.yml deleted file mode 100644 index 4b5c467..0000000 --- a/.github/workflows/delivery.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: delivery - -on: [push, pull_request] - -jobs: - delivery: - - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@master - - name: Run Chef Delivery - uses: actionshub/chef-delivery@master - env: - CHEF_LICENSE: accept-no-persist \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0ea448e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -addons: - apt: - sources: - - chef-current-xenial - packages: - - chef-workstation - -install: echo "skip bundle install" - -env: - - CHEF_LICENSE=accept - -branches: - only: - - master - -services: docker - -env: - matrix: - - INSTANCE=default-centos-6 - - INSTANCE=default-centos-7 - - INSTANCE=default-debian-9 - - INSTANCE=default-debian-10 - - INSTANCE=default-ubuntu-1604 - - INSTANCE=default-ubuntu-1804 - - INSTANCE=canonical-centos-6 - - INSTANCE=canonical-centos-7 - - INSTANCE=canonical-debian-9 - - INSTANCE=canonical-debian-10 - - INSTANCE=canonical-ubuntu-1604 - - INSTANCE=canonical-ubuntu-1804 - -before_script: - - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - - eval "$(chef shell-init bash)" - - chef --version - -script: KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen verify ${INSTANCE} diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d1fc6f..384e3dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Sous Chefs Adoption +- Update to use Sous Chefs GH workflow ### Added