Skip to content

Commit dcd616e

Browse files
author
Daniel Carabas
committed
pdk update
1 parent e8a0047 commit dcd616e

File tree

3 files changed

+86
-13
lines changed

3 files changed

+86
-13
lines changed

.github/workflows/auto_release.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: "Auto release"
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * 6'
6+
workflow_dispatch:
7+
8+
env:
9+
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
10+
HONEYCOMB_DATASET: litmus tests
11+
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
13+
jobs:
14+
auto_release:
15+
name: "Automatic release prep"
16+
runs-on: ubuntu-20.04
17+
18+
steps:
19+
- name: "Honeycomb: Start recording"
20+
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
21+
with:
22+
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
23+
dataset: ${{ env.HONEYCOMB_DATASET }}
24+
job-status: ${{ job.status }}
25+
26+
- name: "Honeycomb: start first step"
27+
run: |
28+
echo STEP_ID="auto-release" >> $GITHUB_ENV
29+
echo STEP_START=$(date +%s) >> $GITHUB_ENV
30+
31+
- name: "Checkout Source"
32+
if: ${{ github.repository_owner == 'puppetlabs' }}
33+
uses: actions/checkout@v2
34+
with:
35+
fetch-depth: 0
36+
persist-credentials: false
37+
38+
- name: "PDK Release prep"
39+
uses: docker://puppet/pdk:nightly
40+
with:
41+
args: 'release prep --force'
42+
env:
43+
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: "Get Version"
46+
if: ${{ github.repository_owner == 'puppetlabs' }}
47+
id: gv
48+
run: |
49+
echo "::set-output name=ver::$(cat metadata.json | jq .version | tr -d \")"
50+
51+
- name: "Commit changes"
52+
if: ${{ github.repository_owner == 'puppetlabs' }}
53+
run: |
54+
git config --local user.email "action@github.com"
55+
git config --local user.name "GitHub Action"
56+
git add .
57+
git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
58+
59+
- name: Create Pull Request
60+
id: cpr
61+
uses: puppetlabs/peter-evans-create-pull-request@v3
62+
if: ${{ github.repository_owner == 'puppetlabs' }}
63+
with:
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
66+
branch: "release-prep"
67+
delete-branch: true
68+
title: "Release prep v${{ steps.gv.outputs.ver }}"
69+
body: "Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb)"
70+
labels: "maintenance"
71+
72+
- name: PR outputs
73+
if: ${{ github.repository_owner == 'puppetlabs' }}
74+
run: |
75+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
76+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
77+
78+
- name: "Honeycomb: Record finish step"
79+
if: ${{ always() }}
80+
run: |
81+
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Finished auto release workflow'

.travis.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,30 @@ stages:
2727
jobs:
2828
fast_finish: true
2929
include:
30-
- before_script:
30+
- bundler_args: --with system_tests
31+
before_script:
3132
- "bundle exec rake 'litmus:provision_list[travis_ub_6]'"
3233
- "bundle exec rake 'litmus:install_agent[puppet6]'"
3334
- "bundle exec rake litmus:install_module"
3435
env:
3536
PLATFORMS: travis_ub_6_puppet6
36-
BUNDLE_WITH: system_tests
37-
rvm: 2.5.7
38-
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
39-
services: docker
40-
stage: acceptance
41-
env: PLATFORMS=travis_ub_6_puppet6
4237
rvm: 2.5.7
4338
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
4439
services: docker
4540
stage: acceptance
4641
- bundler_args: --with system_tests
4742
before_script:
48-
-
49-
before_script:
5043
- "bundle exec rake 'litmus:provision_list[travis_deb]'"
5144
- "bundle exec rake 'litmus:install_agent[puppet6]'"
5245
- "bundle exec rake litmus:install_module"
5346
env:
5447
PLATFORMS: travis_deb_puppet6
55-
BUNDLE_WITH: system_tests
5648
rvm: 2.5.7
5749
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
5850
services: docker
5951
stage: acceptance
60-
- before_script:
52+
- bundler_args: --with system_tests
53+
before_script:
6154
- "bundle exec rake 'litmus:provision_list[travis_el7]'"
6255
- "bundle exec rake 'litmus:install_agent[puppet6]'"
6356
- "bundle exec rake litmus:install_module"
@@ -74,7 +67,6 @@ jobs:
7467
- "bundle exec rake litmus:install_module"
7568
env:
7669
PLATFORMS: travis_el8_puppet6
77-
BUNDLE_WITH: system_tests
7870
rvm: 2.5.7
7971
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
8072
services: docker

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@
104104
"description": "Standard Library for Puppet Modules",
105105
"pdk-version": "1.18.1",
106106
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
107-
"template-ref": "heads/main-0-g2bf2de6"
107+
"template-ref": "heads/main-0-g44cc7ed"
108108
}

0 commit comments

Comments
 (0)