diff --git a/.github/workflows/auto_release.yml b/.github/workflows/auto_release.yml new file mode 100644 index 0000000..a88b99c --- /dev/null +++ b/.github/workflows/auto_release.yml @@ -0,0 +1,81 @@ +name: "Auto release" + +on: + schedule: + - cron: '0 3 * * 6' + workflow_dispatch: + +env: + HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6 + HONEYCOMB_DATASET: litmus tests + CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + auto_release: + name: "Automatic release prep" + runs-on: ubuntu-20.04 + + steps: + - name: "Honeycomb: Start recording" + uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1 + with: + apikey: ${{ env.HONEYCOMB_WRITEKEY }} + dataset: ${{ env.HONEYCOMB_DATASET }} + job-status: ${{ job.status }} + + - name: "Honeycomb: start first step" + run: | + echo STEP_ID="auto-release" >> $GITHUB_ENV + echo STEP_START=$(date +%s) >> $GITHUB_ENV + + - name: "Checkout Source" + if: ${{ github.repository_owner == 'puppetlabs' }} + uses: actions/checkout@v2 + with: + fetch-depth: 0 + persist-credentials: false + + - name: "PDK Release prep" + uses: docker://puppet/pdk:nightly + with: + args: 'release prep --force' + env: + CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: "Get Version" + if: ${{ github.repository_owner == 'puppetlabs' }} + id: gv + run: | + echo "::set-output name=ver::$(cat metadata.json | jq .version | tr -d \")" + + - name: "Commit changes" + if: ${{ github.repository_owner == 'puppetlabs' }} + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add . + git commit -m "Release prep v${{ steps.gv.outputs.ver }}" + + - name: Create Pull Request + id: cpr + uses: puppetlabs/peter-evans-create-pull-request@v3 + if: ${{ github.repository_owner == 'puppetlabs' }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "Release prep v${{ steps.gv.outputs.ver }}" + branch: "release-prep" + delete-branch: true + title: "Release prep v${{ steps.gv.outputs.ver }}" + body: "Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb)" + labels: "maintenance" + + - name: PR outputs + if: ${{ github.repository_owner == 'puppetlabs' }} + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" + + - name: "Honeycomb: Record finish step" + if: ${{ always() }} + run: | + buildevents step $TRACE_ID $STEP_ID $STEP_START 'Finished auto release workflow' diff --git a/.sync.yml b/.sync.yml index 92c9a14..2fe7962 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,67 +1,64 @@ --- ".gitlab-ci.yml": delete: true ".rubocop.yml": include_todos: true ".travis.yml": global_env: - HONEYCOMB_WRITEKEY="7f3c63a70eecc61d635917de46bea4e6",HONEYCOMB_DATASET="litmus tests" deploy_to_forge: enabled: false dist: trusty user: puppet secure: '' branches: - release use_litmus: true litmus: provision_list: - ---travis_el - travis_deb - travis_el7 - travis_el8 complex: - collection: puppet_collection: - puppet6 provision_list: - travis_ub_6 - - collection: - puppet_collection: - - puppet5 - provision_list: - - travis_ub_5 simplecov: true notifications: slack: secure: j5y9T97u6QlDPs4eEnDNch2IGAzbfWycVcMutP3u9Klvkgqu33xtxHgyAQOW+2A/Xw2sKQs/LzIiUeQRzlNMcAPRZ0rK19sW1w5OgZGcd131HViFDfX8W7V4R41sZVNF232JekMr7RwPGIaZ9htaGsDJeJF8TaiG1Akk32LQZV8= appveyor.yml: environment: HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6 HONEYCOMB_DATASET: litmus tests use_litmus: true matrix_extras: - RUBY_VERSION: 25-x64 ACCEPTANCE: 'yes' TARGET_HOST: localhost - RUBY_VERSION: 25-x64 ACCEPTANCE: 'yes' TARGET_HOST: localhost APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 simplecov: true Gemfile: optional: ":development": - gem: github_changelog_generator spec/spec_helper.rb: mock_with: ":rspec" coverage_report: true .gitpod.Dockerfile: unmanaged: false .gitpod.yml: unmanaged: false .github/workflows/nightly.yml: unmanaged: false .github/workflows/pr_test.yml: unmanaged: false +.github/workflows/auto_release.yml: + unmanaged: false diff --git a/.travis.yml b/.travis.yml index f6aae9e..2785c89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,109 +1,98 @@ --- os: linux dist: trusty language: ruby cache: bundler before_install: - bundle -v - rm -f Gemfile.lock - "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner" - "# See https://github.com/puppetlabs/pdk-templates/commit/705154d5c437796b821691b707156e1b056d244f for an example of how this was used" - "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set" - '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION' - gem --version - bundle -v script: - 'SIMPLECOV=yes bundle exec rake $CHECK' bundler_args: --without system_tests rvm: - 2.5.7 env: global: - HONEYCOMB_WRITEKEY="7f3c63a70eecc61d635917de46bea4e6",HONEYCOMB_DATASET="litmus tests" stages: - static - spec - acceptance jobs: fast_finish: true include: - - before_script: + - bundler_args: --with system_tests + before_script: - "bundle exec rake 'litmus:provision_list[travis_ub_6]'" - "bundle exec rake 'litmus:install_agent[puppet6]'" - "bundle exec rake litmus:install_module" env: PLATFORMS: travis_ub_6_puppet6 - BUNDLE_WITH: system_tests rvm: 2.5.7 script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"] services: docker stage: acceptance - - before_script: - - "bundle exec rake 'litmus:provision_list[travis_ub_5]'" - - "bundle exec rake 'litmus:install_agent[puppet5]'" - - "bundle exec rake litmus:install_module" - env: - PLATFORMS: travis_ub_5_puppet5 - BUNDLE_WITH: system_tests - rvm: 2.5.7 - script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"] - services: docker - stage: acceptance - - before_script: + - bundler_args: --with system_tests + before_script: - "bundle exec rake 'litmus:provision_list[travis_deb]'" - "bundle exec rake 'litmus:install_agent[puppet6]'" - "bundle exec rake litmus:install_module" env: PLATFORMS: travis_deb_puppet6 - BUNDLE_WITH: system_tests rvm: 2.5.7 script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"] services: docker stage: acceptance - - before_script: + - bundler_args: --with system_tests + before_script: - "bundle exec rake 'litmus:provision_list[travis_el7]'" - "bundle exec rake 'litmus:install_agent[puppet6]'" - "bundle exec rake litmus:install_module" env: PLATFORMS: travis_el7_puppet6 - BUNDLE_WITH: system_tests rvm: 2.5.7 script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"] services: docker stage: acceptance - - before_script: + - bundler_args: --with system_tests + before_script: - "bundle exec rake 'litmus:provision_list[travis_el8]'" - "bundle exec rake 'litmus:install_agent[puppet6]'" - "bundle exec rake litmus:install_module" env: PLATFORMS: travis_el8_puppet6 - BUNDLE_WITH: system_tests rvm: 2.5.7 script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"] services: docker stage: acceptance - env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint" stage: static - env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec rvm: 2.5.7 stage: spec branches: only: - main - /^v\d/ - release notifications: email: false slack: secure: j5y9T97u6QlDPs4eEnDNch2IGAzbfWycVcMutP3u9Klvkgqu33xtxHgyAQOW+2A/Xw2sKQs/LzIiUeQRzlNMcAPRZ0rK19sW1w5OgZGcd131HViFDfX8W7V4R41sZVNF232JekMr7RwPGIaZ9htaGsDJeJF8TaiG1Akk32LQZV8= deploy: provider: puppetforge username: puppet password: secure: "" on: tags: true all_branches: true condition: "$DEPLOY_TO_FORGE = yes" diff --git a/metadata.json b/metadata.json index ee5a934..2dbdf6b 100644 --- a/metadata.json +++ b/metadata.json @@ -1,108 +1,108 @@ { "name": "puppetlabs-stdlib", "version": "6.6.0", "author": "puppetlabs", "summary": "Standard library of resources for Puppet modules.", "license": "Apache-2.0", "source": "https://github.com/puppetlabs/puppetlabs-stdlib", "project_page": "https://github.com/puppetlabs/puppetlabs-stdlib", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES", "dependencies": [ ], "operatingsystem_support": [ { "operatingsystem": "RedHat", "operatingsystemrelease": [ "6", "7", "8" ] }, { "operatingsystem": "CentOS", "operatingsystemrelease": [ "6", "7", "8" ] }, { "operatingsystem": "OracleLinux", "operatingsystemrelease": [ "6", "7" ] }, { "operatingsystem": "Scientific", "operatingsystemrelease": [ "6", "7" ] }, { "operatingsystem": "SLES", "operatingsystemrelease": [ "12", "15" ] }, { "operatingsystem": "Debian", "operatingsystemrelease": [ "8", "9", "10" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "14.04", "16.04", "18.04", "20.04" ] }, { "operatingsystem": "Solaris", "operatingsystemrelease": [ "10", "11" ] }, { "operatingsystem": "Windows", "operatingsystemrelease": [ "2008", "2008 R2", "2012", "2012 R2", "2016", "2019", "7", "8.1", "10" ] }, { "operatingsystem": "AIX", "operatingsystemrelease": [ "5.3", "6.1", "7.1" ] } ], "requirements": [ { "name": "puppet", - "version_requirement": ">= 5.5.10 < 8.0.0" + "version_requirement": ">= 6.0.0 < 8.0.0" } ], "description": "Standard Library for Puppet Modules", "pdk-version": "1.18.1", "template-url": "https://github.com/puppetlabs/pdk-templates#main", - "template-ref": "heads/main-0-g2bf2de6" + "template-ref": "heads/main-0-g44cc7ed" } diff --git a/provision.yaml b/provision.yaml index b9b4ed7..26913e4 100644 --- a/provision.yaml +++ b/provision.yaml @@ -1,120 +1,84 @@ --- default: provisioner: docker images: - litmusimage/centos:7 vagrant: provisioner: vagrant images: - centos/7 - generic/ubuntu1804 - gusztavvargadr/windows-server travis_deb: provisioner: docker images: - litmusimage/debian:8 - litmusimage/debian:9 - litmusimage/debian:10 -travis_ub_5: - provisioner: docker - images: - - litmusimage/ubuntu:14.04 - - litmusimage/ubuntu:16.04 - - litmusimage/ubuntu:18.04 travis_ub_6: provisioner: docker images: - litmusimage/ubuntu:14.04 - litmusimage/ubuntu:16.04 - litmusimage/ubuntu:18.04 - litmusimage/ubuntu:20.04 travis_el7: provisioner: docker images: - litmusimage/centos:7 - litmusimage/oraclelinux:7 - litmusimage/scientificlinux:7 travis_el8: provisioner: docker images: - litmusimage/centos:8 -release_checks_5: - provisioner: abs - images: - - redhat-6-x86_64 - - redhat-7-x86_64 - - redhat-8-x86_64 - - centos-6-x86_64 - - centos-7-x86_64 - - centos-8-x86_64 - - oracle-5-x86_64 - - oracle-6-x86_64 - - oracle-7-x86_64 - - scientific-6-x86_64 - - scientific-7-x86_64 - - debian-8-x86_64 - - debian-9-x86_64 - - debian-10-x86_64 - - sles-12-x86_64 - - ubuntu-1404-x86_64 - - ubuntu-1604-x86_64 - - ubuntu-1804-x86_64 - - win-2008-x86_64 - - win-2008r2-x86_64 - - win-2012-x86_64 - - win-2012r2-x86_64 - - win-2016-x86_64 - - win-2019-x86_64 - - win-7-x86_64 - - win-81-x86_64 - - win-10-pro-x86_64 release_checks_6: provisioner: abs images: - redhat-6-x86_64 - redhat-7-x86_64 - redhat-8-x86_64 - centos-6-x86_64 - centos-7-x86_64 - centos-8-x86_64 - oracle-5-x86_64 - oracle-6-x86_64 - oracle-7-x86_64 - scientific-6-x86_64 - scientific-7-x86_64 - debian-8-x86_64 - debian-9-x86_64 - debian-10-x86_64 - sles-12-x86_64 - ubuntu-1404-x86_64 - ubuntu-1604-x86_64 - ubuntu-1804-x86_64 - ubuntu-2004-x86_64 - win-2008-x86_64 - win-2008r2-x86_64 - win-2012-x86_64 - win-2012r2-x86_64 - win-2016-x86_64 - win-2019-x86_64 - win-7-x86_64 - win-81-x86_64 - win-10-pro-x86_64 release_checks_7: provisioner: abs images: - redhat-7-x86_64 - redhat-8-x86_64 - centos-7-x86_64 - centos-8-x86_64 - oracle-7-x86_64 - scientific-7-x86_64 - sles-12-x86_64 - sles-15-x86_64 - debian-9-x86_64 - debian-10-x86_64 - ubuntu-1804-x86_64 - ubuntu-2004-x86_64 - win-2012r2-x86_64 - win-2016-x86_64 - win-2019-x86_64 - win-10-pro-x86_64