simp-test 0.2.0 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/pr_tests.yml +0 -18
- data/.github/workflows/tag_deploy_rubygem.yml +37 -7
- data/.gitlab-ci.yml +1 -0
- data/lib/simp/test/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccb769727351c7642097dcfcd4e54ca1dd3d5423117d34c48d8387ba254e64d4
|
4
|
+
data.tar.gz: ff206eb86e90069cecfdaa1eabd1d9aea59d38717ac8cf1fc1e19e04f05a8b35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38f3fc3380a0640cc7e2aee3d0e7fb6725ec1dbebb80902c6149dea07e1f216c28d58513e912d4132f43906896cd23db87ba618e1435fb96442ea2f2f42756c6
|
7
|
+
data.tar.gz: d41622abd737631923d36e2542e1a42bca4ba4b0bcbe7a49087a228aad5e66a55819047887eccab7adc401a303ce2cd55e38e61dfe8e16aedc570b44ad19603e
|
@@ -38,24 +38,6 @@ jobs:
|
|
38
38
|
bundle show
|
39
39
|
bundle exec rake rubocop
|
40
40
|
|
41
|
-
# releng-checks:
|
42
|
-
# name: 'RELENG checks'
|
43
|
-
# runs-on: ubuntu-18.04
|
44
|
-
# steps:
|
45
|
-
# - uses: actions/checkout@v2
|
46
|
-
# - name: 'Install Ruby ${{matrix.puppet.ruby_version}}'
|
47
|
-
# uses: ruby/setup-ruby@v1
|
48
|
-
# with:
|
49
|
-
# ruby-version: 2.5
|
50
|
-
# bundler-cache: true
|
51
|
-
# - name: 'Tags and changelogs'
|
52
|
-
# run: |
|
53
|
-
# bundle exec rake pkg:check_version
|
54
|
-
# bundle exec rake pkg:compare_latest_tag
|
55
|
-
# bundle exec rake pkg:create_tag_changelog
|
56
|
-
# - name: 'Test-build the Puppet module'
|
57
|
-
# run: 'bundle exec pdk build --force'
|
58
|
-
|
59
41
|
spec-tests:
|
60
42
|
name: 'Spec tests'
|
61
43
|
runs-on: ubuntu-18.04
|
@@ -1,9 +1,11 @@
|
|
1
1
|
# Build & Deploy RubyGem & GitHub release when a SemVer tag is pushed
|
2
|
+
#
|
3
|
+
# This workflow's jobs are only triggered in repos under the `simp` organization
|
2
4
|
# ------------------------------------------------------------------------------
|
3
5
|
#
|
4
6
|
# NOTICE: **This file is maintained with puppetsync**
|
5
7
|
#
|
6
|
-
# This file is updated automatically as part of
|
8
|
+
# This file is updated automatically as part of a standardized asset baseline.
|
7
9
|
#
|
8
10
|
# The next baseline sync will overwrite any local changes to this file!
|
9
11
|
#
|
@@ -21,6 +23,19 @@
|
|
21
23
|
#
|
22
24
|
# * The CHANGLOG text is altered to remove RPM-style date headers, which don't
|
23
25
|
# render well as markdown on the GitHub release pages
|
26
|
+
#
|
27
|
+
# * By default, the gem is built and released using the standard rake tasks
|
28
|
+
# from "bundler/gem_tasks". To override these, create a JSON file at
|
29
|
+
# `.github/workflows.local.json`, using the format:
|
30
|
+
#
|
31
|
+
# {
|
32
|
+
# "gem_build_command": "bundle exec rake build",
|
33
|
+
# "gem_release_command": "bundle exec rake build release:rubygem_push",
|
34
|
+
# "gem_pkg_dir": "pkg"
|
35
|
+
# }
|
36
|
+
#
|
37
|
+
# All keys are optional.
|
38
|
+
#
|
24
39
|
---
|
25
40
|
name: 'Tag: Release to GitHub & rubygems.org'
|
26
41
|
|
@@ -36,10 +51,12 @@ env:
|
|
36
51
|
jobs:
|
37
52
|
releng-checks:
|
38
53
|
name: "RELENG checks"
|
54
|
+
if: github.repository_owner == 'simp'
|
39
55
|
runs-on: ubuntu-18.04
|
40
56
|
outputs:
|
41
57
|
build_command: ${{ steps.commands.outputs.build_command }}
|
42
58
|
release_command: ${{ steps.commands.outputs.release_command }}
|
59
|
+
pkg_dir: ${{ steps.commands.outputs.pkg_dir }}
|
43
60
|
steps:
|
44
61
|
- name: "Assert '${{ github.ref }}' is a tag"
|
45
62
|
run: '[[ "$GITHUB_REF" =~ ^refs/tags/ ]] || { echo "::error ::GITHUB_REF is not a tag: ${GITHUB_REF}"; exit 1 ; }'
|
@@ -53,7 +70,12 @@ jobs:
|
|
53
70
|
# By default, these are the standard tasks from "bundler/gem_tasks"
|
54
71
|
# To override them in the LOCAL_WORKFLOW_CONFIG_FILE
|
55
72
|
GEM_BUILD_COMMAND='bundle exec rake build'
|
56
|
-
GEM_RELEASE_COMMAND='
|
73
|
+
GEM_RELEASE_COMMAND='bundle exec rake build release:rubygem_push'
|
74
|
+
GEM_PKG_DIR='pkg'
|
75
|
+
if jq -r '. | keys' "$LOCAL_WORKFLOW_CONFIG_FILE" 2>/dev/null | \
|
76
|
+
grep -w '"gem_pkg_dir"' &> /dev/null; then
|
77
|
+
GEM_PKG_DIR="$(jq .gem_pkg_dir "$LOCAL_WORKFLOW_CONFIG_FILE" )"
|
78
|
+
fi
|
57
79
|
if jq -r '. | keys' "$LOCAL_WORKFLOW_CONFIG_FILE" 2>/dev/null | \
|
58
80
|
grep -w '"gem_build_command"' &> /dev/null; then
|
59
81
|
GEM_BUILD_COMMAND="$(jq .gem_build_command "$LOCAL_WORKFLOW_CONFIG_FILE" )"
|
@@ -63,19 +85,23 @@ jobs:
|
|
63
85
|
GEM_RELEASE_COMMAND="$(jq .gem_release_command "$LOCAL_WORKFLOW_CONFIG_FILE" )"
|
64
86
|
fi
|
65
87
|
echo "::set-output name=build_command::${GEM_BUILD_COMMAND}"
|
88
|
+
echo "::set-output name=pkg_dir::${GEM_PKG_DIR}"
|
66
89
|
echo "::set-output name=release_command::${GEM_RELEASE_COMMAND}"
|
67
|
-
echo "+set-output name=build_command::${GEM_BUILD_COMMAND}"
|
68
|
-
echo "+set-output name=release_command::${GEM_RELEASE_COMMAND}"
|
69
90
|
- uses: ruby/setup-ruby@v1
|
70
91
|
with:
|
71
92
|
ruby-version: 2.5
|
72
93
|
bundler-cache: true
|
73
94
|
- name: Test build the package
|
74
95
|
run: "${{ steps.commands.outputs.build_command }}"
|
96
|
+
- name: "Assert '${{ github.ref }}' matches the package version"
|
97
|
+
run: |
|
98
|
+
tag="${GITHUB_REF/refs\/tags\//}"
|
99
|
+
[ -f ${{ steps.commands.outputs.pkg_dir }}/*-${tag}.gem ] || { echo "::error ::tag '${tag}' does not match package $(ls -1 ${{ steps.commands.outputs.pkg_dir }}/*.gem)"; exit 1 ; }
|
75
100
|
|
76
101
|
create-github-release:
|
77
102
|
name: Deploy GitHub Release
|
78
103
|
needs: [ releng-checks ]
|
104
|
+
if: github.repository_owner == 'simp'
|
79
105
|
runs-on: ubuntu-18.04
|
80
106
|
steps:
|
81
107
|
- name: Checkout code
|
@@ -119,6 +145,7 @@ jobs:
|
|
119
145
|
deploy-rubygem:
|
120
146
|
name: Deploy RubyGem Release
|
121
147
|
needs: [ releng-checks ]
|
148
|
+
if: github.repository_owner == 'simp'
|
122
149
|
runs-on: ubuntu-18.04
|
123
150
|
env:
|
124
151
|
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
@@ -135,7 +162,12 @@ jobs:
|
|
135
162
|
ruby-version: 2.5
|
136
163
|
bundler-cache: true
|
137
164
|
- name: Build RubyGem
|
138
|
-
run:
|
165
|
+
run: |
|
166
|
+
echo "Setting up file permissions..."
|
167
|
+
chmod -R go=u-w .
|
168
|
+
|
169
|
+
echo "Running '$BUILD_COMMAND'..."
|
170
|
+
$BUILD_COMMAND
|
139
171
|
|
140
172
|
- name: Release RubyGem
|
141
173
|
run: |
|
@@ -148,7 +180,5 @@ jobs:
|
|
148
180
|
EOF
|
149
181
|
chmod 0600 ~/.gem/credentials
|
150
182
|
|
151
|
-
chmod -R go=u-w .
|
152
|
-
|
153
183
|
echo "Running '$RELEASE_COMMAND'..."
|
154
184
|
$RELEASE_COMMAND
|
data/.gitlab-ci.yml
CHANGED
data/lib/simp/test/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simp-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SIMP Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|