Skip to content

Commit f665063

Browse files
authored
(SIMP-9408) GLCI & GHA release workflow fixes (#75)
1 parent c0ead1b commit f665063

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

.github/workflows/pr_glci_cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
# NOTICE: **This file is maintained with puppetsync**
99
#
10-
# This file is updated automatically as part of a puppet module baseline.
10+
# This file is updated automatically as part of a standardized asset baseline.
1111
#
1212
# The next baseline sync will overwrite any local changes to this file!
1313
#

.github/workflows/pr_glci_manual.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# NOTICE: **This file is maintained with puppetsync**
55
#
6-
# This file is updated automatically as part of a puppet module baseline.
6+
# This file is updated automatically as part of a standardized asset baseline.
77
#
88
# The next baseline sync will overwrite any local changes to this file!
99
#

.github/workflows/pr_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
with:
130130
ruby-version: ${{matrix.puppet.ruby_version}}
131131
bundler-cache: true
132-
- run: 'command -v rpm || if command -v apt-get; then apt-get update; apt-get install -y rpm; fi ||:'
132+
- run: 'command -v rpm || if command -v apt-get; then sudo apt-get update; sudo apt-get install -y rpm; fi ||:'
133133
- run: 'bundle exec rake spec'
134134

135135
# dump_contexts:

.github/workflows/tag_deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ env:
3535
jobs:
3636
releng-checks:
3737
name: "RELENG checks"
38+
if: github.repository_owner == 'simp'
3839
runs-on: ubuntu-18.04
3940
steps:
4041
- name: "Assert '${{ github.ref }}' is a tag"
@@ -57,6 +58,7 @@ jobs:
5758
create-github-release:
5859
name: Deploy GitHub Release
5960
needs: [ releng-checks ]
61+
if: github.repository_owner == 'simp'
6062
runs-on: ubuntu-18.04
6163
steps:
6264
- name: Checkout code
@@ -100,6 +102,7 @@ jobs:
100102
deploy-to-puppet-forge:
101103
name: Deploy PuppetForge Release
102104
needs: [ releng-checks ]
105+
if: github.repository_owner == 'simp'
103106
runs-on: ubuntu-18.04
104107
env:
105108
PUPPETFORGE_API_TOKEN: ${{ secrets.PUPPETFORGE_API_TOKEN }}

.gitlab-ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ variables:
5757
- '.vendor'
5858
before_script:
5959
# Print important environment variables that may affect this job
60-
- 'ruby -e "puts %(\n\n), %q(=)*80, %(\nSIMP-relevant Environment Variables:\n\n#{e=ENV.keys.grep(/^PUPPET|^SIMP|^BEAKER|MATRIX/); pad=((e.map{|x| x.size}.max||0)+1); e.map{|v| %( * #{%(#{v}:).ljust(pad)} #{39.chr + ENV[v] + 39.chr}\n)}.join}\n), %q(=)*80, %(\n\n)"'
60+
- 'ruby -e "puts %(\n\n), %q(=)*80, %(\nSIMP-relevant Environment Variables:\n\n#{e=ENV.keys.grep(/^PUPPET|^SIMP|^BEAKER|MATRIX/); pad=((e.map{|x| x.size}.max||0)+1); e.map{|v| %( * #{%(#{v}:).ljust(pad)} #{39.chr + ENV[v] + 39.chr}\n)}.join}\n), %q(=)*80, %(\n\n)" || :'
6161

6262
- echo -e "\e[0Ksection_start:`date +%s`:before_script10[collapsed=true]\r\e[0KDiagnostic ruby & gem information"
6363
# Diagnostic ruby & gem information
@@ -69,13 +69,11 @@ variables:
6969

7070
# If RVM is available, make SURE it's using the right Ruby:
7171
# * Source rvm (to run in non-login shells)
72-
# * If any $MATRIX_RUBY_VERSION rubies are available, use the latest
73-
# * Otherwise: install & use ${MATRIX_RUBY_VERSION}-head (e.g., latest)
74-
# * ^^ This could be wonky and introduce variations across runners
75-
# * ^^ maybe it should just fail if there is no $MATRIX_RUBY_VERSION installed?
72+
# * Use $MATRIX_RUBY_VERSION ruby, install if not present
7673
- echo -e "\e[0Ksection_start:`date +%s`:before_script20[collapsed=true]\r\e[0KEnsure RVM & ruby is installed"
77-
- "command -v rvm && { if declare -p rvm_path &> /dev/null; then source \"${rvm_path}/scripts/rvm\"; else source \"$HOME/.rvm/scripts/rvm\" || source /etc/profile.d/rvm.sh; fi; }"
78-
- "command -v rvm && { LATEST_RVM_RUBY_XY=\"$(rvm ls | grep \"$MATRIX_RUBY_VERSION\" | tail -1 | sed -e 's/^.*\\([0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\\).*$/\\1/g')\"; if [ -z \"$LATEST_RVM_RUBY_XY\" ]; then LATEST_RVM_RUBY_XY=\"${MATRIX_RUBY_VERSION}-head\"; rvm install \"$LATEST_RVM_RUBY\" --no-docs; else echo \"Found RVM Ruby: '${LATEST_RVM_RUBY_XY}'\"; fi; rvm use \"$LATEST_RVM_RUBY_XY\" ; }"
74+
- "if command -v rvm; then if declare -p rvm_path &> /dev/null; then source \"${rvm_path}/scripts/rvm\"; else source \"$HOME/.rvm/scripts/rvm\" || source /etc/profile.d/rvm.sh; fi; fi"
75+
- "if command -v rvm && ! grep rvm_install_on_use_flag=1 ~/.rvmrc; then echo rvm_install_on_use_flag=1 >> ~/.rvmrc || echo '== WARNING: ~/.rvmrc is missing rvm_install_on_use_flag=1 and I failed to add it'; fi"
76+
- "if command -v rvm; then rvm use \"$MATRIX_RUBY_VERSION\"; else echo \"rvm not detected; skipping 'rvm use'\"; fi"
7977
- 'ruby --version || :'
8078
- 'gem list sync || :'
8179
- echo -e "\e[0Ksection_end:`date +%s`:before_script20\r\e[0K"

0 commit comments

Comments
 (0)