mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
add shellcheck to travis CI pipeline (#3297)
Add checking shell scripts (files with extension `.sh`).
This commit is contained in:
@@ -20,6 +20,13 @@ jobs:
|
||||
quay.io/coreos/yamllint --config-data
|
||||
'{extends: default, rules: {line-length: {level: warning, max: 120}}}'
|
||||
./examples/ ./installer/
|
||||
# shellcheck
|
||||
- script: >
|
||||
docker run -v $(pwd):/workdir:ro
|
||||
--entrypoint sh quay.io/coreos/shellcheck-alpine:v0.5.0
|
||||
-c 'for file in $(find /workdir/ -type f -name "*.sh"); do
|
||||
if ! shellcheck --format=gcc $file; then export FAILED=true; fi; done;
|
||||
if [ "$FAILED" != "" ]; then exit 1; fi'
|
||||
# Go vet
|
||||
- script: "docker run -v $PWD:/go/src/github.com/coreos/tectonic-installer -w /go/src/github.com/coreos/tectonic-installer quay.io/coreos/golang-testing go vet ./installer/..."
|
||||
# Go lint
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# Vars exported to the build info
|
||||
echo TECTONIC_VERSION ${TECTONIC_VERSION}
|
||||
echo BUILD_TIME $(date -u '+%Y-%m-%dT%H:%M:%S%z')
|
||||
echo TECTONIC_VERSION "${TECTONIC_VERSION}"
|
||||
echo BUILD_TIME "$(date -u '+%Y-%m-%dT%H:%M:%S%z')"
|
||||
|
||||
@@ -19,8 +19,8 @@ set -e
|
||||
--render-output=/assets/tnc-bootstrap
|
||||
|
||||
mkdir -p /etc/kubernetes/manifests/
|
||||
cp $(pwd)/tnc-bootstrap/tectonic-node-controller-pod.yaml /etc/kubernetes/manifests/
|
||||
cp $(pwd)/tnc-bootstrap/tectonic-node-controller-config.yaml /etc/kubernetes/tnc-config
|
||||
cp "$(pwd)/tnc-bootstrap/tectonic-node-controller-pod.yaml" /etc/kubernetes/manifests/
|
||||
cp "$(pwd)/tnc-bootstrap/tectonic-node-controller-config.yaml" /etc/kubernetes/tnc-config
|
||||
|
||||
# We originally wanted to run the etcd cert signer as
|
||||
# a static pod, but kubelet could't remove static pod
|
||||
@@ -28,7 +28,7 @@ cp $(pwd)/tnc-bootstrap/tectonic-node-controller-config.yaml /etc/kubernetes/tnc
|
||||
# docker container.
|
||||
# See https://github.com/kubernetes/kubernetes/issues/43292
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2154,SC2034
|
||||
signer_id=$(/usr/bin/docker run -d \
|
||||
--tmpfs /tmp \
|
||||
--volume /opt/tectonic/tls:/opt/tectonic/tls:ro \
|
||||
@@ -45,8 +45,8 @@ signer_id=$(/usr/bin/docker run -d \
|
||||
--servercertdur=26280h)
|
||||
|
||||
# Wait for the etcd cluster to come up.
|
||||
# shellcheck disable=SC2154
|
||||
export ETCDCTL_API=3
|
||||
# shellcheck disable=SC2154,SC2086
|
||||
/usr/bin/etcdctl \
|
||||
--dial-timeout=10m \
|
||||
--cacert=/opt/tectonic/tls/etcd-client-ca.crt \
|
||||
@@ -56,11 +56,11 @@ export ETCDCTL_API=3
|
||||
endpoint health
|
||||
export ETCDCTL_API=
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2154,SC1083
|
||||
/usr/bin/docker kill $${signer_id}
|
||||
rm /etc/kubernetes/manifests/tectonic-node-controller-pod.yaml
|
||||
|
||||
cp -r $(pwd)/bootstrap-configs /etc/kubernetes/bootstrap-configs
|
||||
cp -r "$(pwd)/bootstrap-configs" /etc/kubernetes/bootstrap-configs
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
/usr/bin/docker run \
|
||||
|
||||
Reference in New Issue
Block a user