Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes to the step registry #6429

Merged
merged 5 commits into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function queue() {
LIVE="$(jobs | wc -l)"
done
echo "${@}"
if [[ -n "${FILTER}" ]]; then
if [[ -n "${FILTER:-}" ]]; then
"${@}" | "${FILTER}" >"${TARGET}" &
else
"${@}" >"${TARGET}" &
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ref:
as: ipi-deprovision-artifacts-artifacts
from: cli
from: stable:cli
commands: ipi-deprovision-artifacts-artifacts-commands.sh
resources:
requests:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/bin/bash

set -o nounset
set -o errext
set -o errexit
set -o pipefail

export PATH=$PATH:/tmp/shared

echo "Gathering installer artifacts ..."
# we don't have jq, so the python equivalent of
# jq '.modules[].resources."aws_instance.bootstrap".primary.attributes."public_ip" | select(.)'
bootstrap_ip=$(python -c \
'import sys, json; d=reduce(lambda x,y: dict(x.items() + y.items()), map(lambda x: x["resources"], json.load(sys.stdin)["modules"])); k="aws_instance.bootstrap"; print d[k]["primary"]["attributes"]["public_ip"] if k in d else ""' \
< ${ARTIFACT_DIR}/installer/terraform.tfstate
< "${SHARED_DIR}/terraform.tfstate"
)

if [ -n "${bootstrap_ip}" ]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ref:
as: ipi-deprovision-artifacts-bootstrap
from: "TODO(skuznets): need an image with ssh+jq+curl"
from: stable:cli # TODO(skuznets): need an image with ssh+jq+curl
commands: ipi-deprovision-artifacts-bootstrap-commands.sh
resources:
requests:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

set -o nounset
set -o errext
set -o errexit
set -o pipefail

echo "Running must-gather..."
mkdir -p ${ARTIFACT_DIR}/must-gather
oc --insecure-skip-tls-verify adm must-gather --dest-dir ${ARTIFACT_DIR}/must-gather > ${ARTIFACT_DIR}/must-gather/must-gather.log
oc --insecure-skip-tls-verify adm must-gather --dest-dir ${ARTIFACT_DIR}/must-gather > ${ARTIFACT_DIR}/must-gather/must-gather.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ref:
as: ipi-deprovision-artifacts-must-gather
from: cli
from: stable:cli
commands: ipi-deprovision-artifacts-must-gather-commands.sh
resources:
requests:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash

set -o nounset
set -o errext
set -o errexit
set -o pipefail

echo "Deprovisioning cluster ..."
openshift-install --dir ${ARTIFACT_DIR}/installer destroy cluster
cp -ar "${SHARED_DIR}" /tmp/installer
openshift-install --dir /tmp/installer destroy cluster
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ref:
as: ipi-deprovision-deprovision
from: installer
from: stable:installer
commands: ipi-deprovision-deprovision-commands.sh
resources:
requests:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

set -o nounset
set -o errext
set -o errexit
set -o pipefail

# TODO(skuznets): oh boy
# TODO(skuznets): oh boy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ref:
as: ipi-install-install
from: installer
from: stable:installer
commands: ipi-install-install-commands.sh
resources:
requests:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

set -o nounset
set -o errext
set -o errexit
set -o pipefail

# We want the cluster to be able to access these images
Expand All @@ -12,7 +12,7 @@ oc adm policy add-role-to-group system:image-puller system:authenticated --nam
oc adm policy add-role-to-user admin system:serviceaccount:ci:ci-chat-bot --namespace "${NAMESPACE}"

# Role for giving the e2e pod permissions to update imagestreams
cat <<EOF | oc apply -f -
oc apply -f - <<EOF
kind: Role
apiVersion: authorization.openshift.io/v1
metadata:
Expand All @@ -28,4 +28,4 @@ rules:
EOF

# Give the e2e pod access to the imagestream-updater role
oc adm policy add-role-to-user ${JOB_NAME_SAFE}-imagestream-updater --serviceaccount default --namespace "${NAMESPACE}"
oc adm policy add-role-to-user "${JOB_NAME_SAFE}-imagestream-updater" --serviceaccount default --namespace "${NAMESPACE}" --role-namespace "${NAMESPACE}"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ref:
as: ipi-install-rbac
from: cli
from: stable:cli
commands: ipi-install-rbac-commands.sh
resources:
requests:
Expand Down