Skip to content

Commit

Permalink
MULTIARCH-3744 Add CI job of SNO with assisted installer for Power
Browse files Browse the repository at this point in the history
Signed-off-by: CS Zhang <zhangcho@us.ibm.com>
  • Loading branch information
cs-zhang committed Feb 5, 2024
1 parent 6620676 commit fda23f1
Show file tree
Hide file tree
Showing 5 changed files with 637 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,13 @@ tests:
OCP_ARCH: amd64
TEST_SUITE: upgrade-conformance
workflow: openshift-upgrade-gcp-heterogeneous
- as: ocp-assisted-sno-power
cron: 0 8 * * 5
steps:
env:
INSTALL_TYPE: assisted
OCP_VERSION: "4.15"
workflow: upi-powervs-sno
zz_generated_metadata:
branch: master
org: openshift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14233,6 +14233,69 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build01
cron: 0 8 * * 5
decorate: true
decoration_config:
skip_cloning: true
extra_refs:
- base_ref: master
org: openshift
repo: multiarch
labels:
ci-operator.openshift.io/variant: nightly-4.15
ci.openshift.io/generator: prowgen
job-release: "4.15"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-openshift-multiarch-master-nightly-4.15-ocp-assisted-sno-power
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --target=ocp-assisted-sno-power
- --variant=nightly-4.15
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /secrets/ci-pull-credentials
name: ci-pull-credentials
readOnly: true
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /secrets/manifest-tool
name: manifest-tool-local-pusher
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build01
decorate: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ ibmcloud plugin install power-iaas
ibmcloud plugin install cis

# Set target powervs and cis service instance
ibmcloud pi st ${POWERVS_INSTANCE_CRN}
ibmcloud pi ws tg ${POWERVS_INSTANCE_CRN}
ibmcloud cis instance-set ${CIS_INSTANCE}

# Setting IBMCLOUD_TRACE to true to enable debug logs for pi and cis operations
export IBMCLOUD_TRACE=true

instance_id=$(ibmcloud pi instances --json | jq -r --arg serverName ${POWERVS_VSI_NAME} '.pvmInstances[] | select (.serverName == $serverName ) | .pvmInstanceID')

ibmcloud pi instance-delete ${instance_id}
instance_id=$(ibmcloud pi ins ls --json | jq -r --arg serverName ${POWERVS_VSI_NAME} '.pvmInstances[] | select (.name == $serverName ) | .id')
if [ -n "${instance_id}" ]; then
ibmcloud pi ins delete ${instance_id}
fi

# Cleanup cis dns records
idToDelete=$(ibmcloud cis dns-records ${CIS_DOMAIN_ID} --name "*.apps.${CLUSTER_NAME}.${BASE_DOMAIN}" --output json | jq -r '.[].id')
Expand All @@ -60,4 +61,4 @@ chmod 0600 ${SSH_PRIVATE}
SSH_OPTIONS=(-o 'PreferredAuthentications=publickey' -o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' -i "${SSH_PRIVATE}")

# Run cleanup-sno.sh to clean up the things created on bastion for SNO node net boot
ssh "${SSH_OPTIONS[@]}" root@${BASTION} "cd ${BASTION_CI_SCRIPTS_DIR} && ./cleanup-sno.sh ${CLUSTER_NAME}"
ssh "${SSH_OPTIONS[@]}" root@${BASTION} "cd ${BASTION_CI_SCRIPTS_DIR}/scripts && ./cleanup-sno.sh ${CLUSTER_NAME}"

0 comments on commit fda23f1

Please sign in to comment.