Skip to content

Commit

Permalink
fix shell scripts for shell check SC2268 (OSC#2354)
Browse files Browse the repository at this point in the history
* fix shell scripts for shell check SC2268

* cache bust to install new gems

* update centos:7's systemd and beaker to support openssl3 changes
  • Loading branch information
johrstrom authored Nov 3, 2022
1 parent a804a19 commit 5a3008c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/vendor/bundle
key: ${{ runner.os }}-${{ matrix.ruby }}-unit-gems-${{ hashFiles('apps/*/Gemfile.lock', 'Gemfile.lock') }}
key: ${{ runner.os }}-${{ matrix.ruby }}-unit-gems-${{ hashFiles('apps/*/Gemfile.lock', 'Gemfile.lock') }}-1

- name: Setup Bundler
run: |
Expand Down
24 changes: 6 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GEM
specs:
ansi (1.5.0)
ast (2.4.2)
beaker (4.36.1)
beaker (4.38.1)
beaker-hostgenerator
ed25519 (~> 1.0)
hocon (~> 1.0)
Expand All @@ -14,8 +14,6 @@ GEM
net-scp (>= 1.2, < 4.0)
net-ssh (>= 5.0)
open_uri_redirections (~> 0.2.1)
pry-byebug (~> 3.9)
rb-readline (~> 0.5.3)
rexml
rsync (~> 1.0.9)
stringify-hash (~> 0.0)
Expand All @@ -31,7 +29,7 @@ GEM
beaker (>= 4.34)
docker-api (~> 2.1)
stringify-hash (~> 0.0.0)
beaker-hostgenerator (1.14.0)
beaker-hostgenerator (1.17.0)
deep_merge (~> 1.0)
beaker-pe (2.11.16)
beaker (~> 4.0)
Expand All @@ -52,9 +50,7 @@ GEM
specinfra (~> 2)
beaker-vmpooler (1.4.0)
stringify-hash (~> 0.0.0)
byebug (11.1.3)
childprocess (4.1.0)
coderay (1.1.3)
colorize (0.8.1)
commander (4.6.0)
highline (~> 2.0.0)
Expand Down Expand Up @@ -89,14 +85,13 @@ GEM
hocon (1.3.1)
in-parallel (0.1.17)
inifile (3.0.0)
method_source (1.0.0)
minitar (0.9)
minitest (5.16.1)
minitest (5.16.3)
multi_json (1.15.0)
multipart-post (2.1.1)
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (7.0.1)
net-telnet (0.1.1)
oga (3.3)
ast
Expand All @@ -107,15 +102,8 @@ GEM
parallel (1.21.0)
parser (3.0.2.0)
ast (~> 2.4.1)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
rainbow (3.0.0)
rake (13.0.6)
rb-readline (0.5.5)
regexp_parser (2.1.1)
require_all (3.0.0)
rexml (3.2.5)
Expand Down
4 changes: 2 additions & 2 deletions hooks/k8s-bootstrap/k8s-bootstrap-ondemand.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

export ONDEMAND_USERNAME="$1"
if [ "x${ONDEMAND_USERNAME}" = "x" ]; then
if [ "${ONDEMAND_USERNAME}" = "" ]; then
echo "Must specify username"
exit 1
fi
HOOK_ENV="$2"
if [ "x${HOOK_ENV}" = "x" ]; then
if [ "${HOOK_ENV}" = "" ]; then
echo "Must specify hook.env path"
exit 1
fi
Expand Down
6 changes: 3 additions & 3 deletions hooks/k8s-bootstrap/set-k8s-creds.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#!/bin/bash

ONDEMAND_USERNAME="$1"
if [ "x${ONDEMAND_USERNAME}" = "x" ]; then
if [ "${ONDEMAND_USERNAME}" = "" ]; then
echo "Must specify username"
exit 1
fi
HOOK_ENV="$2"
if [ "x${HOOK_ENV}" = "x" ]; then
if [ "${HOOK_ENV}" = "" ]; then
echo "Must specify hook.env path"
exit 1
fi

# shellcheck disable=SC1090
source "$HOOK_ENV"

if [ "x${K8S_USERNAME_PREFIX}" != "x" ]; then
if [ "${K8S_USERNAME_PREFIX}" != "" ]; then
K8S_USERNAME="${K8S_USERNAME_PREFIX}${ONDEMAND_USERNAME}"
else
K8S_USERNAME="${ONDEMAND_USERNAME}"
Expand Down
4 changes: 3 additions & 1 deletion spec/e2e/nodesets/el7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ HOSTS:
docker_cmd:
- '/usr/sbin/init'
docker_image_commands:
- 'yum install -y yum-utils wget which cronie iproute initscripts'
- 'yum install -y yum-utils wget which cronie iproute initscripts strace'
- wget --no-check-certificate https://copr.fedorainfracloud.org/coprs/jsynacek/systemd-backports-for-centos-7/repo/epel-7/jsynacek-systemd-backports-for-centos-7-epel-7.repo -O /etc/yum.repos.d/jsynacek-systemd-centos-7.repo
- yum update -y systemd
docker_env:
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
Expand Down

0 comments on commit 5a3008c

Please sign in to comment.