|
| 1 | +presets: |
| 2 | +- labels: |
| 3 | + preset-ibmcloud-cred: "true" |
| 4 | + volumeMounts: |
| 5 | + - mountPath: /etc/secret-volume |
| 6 | + name: prow-job-ssh-private-key |
| 7 | + readOnly: true |
| 8 | + env: |
| 9 | + - name: TF_VAR_powervs_api_key |
| 10 | + valueFrom: |
| 11 | + secretKeyRef: |
| 12 | + name: prow-job-api-key |
| 13 | + key: key |
| 14 | + volumes: |
| 15 | + - name: prow-job-ssh-private-key |
| 16 | + secret: |
| 17 | + defaultMode: 256 |
| 18 | + secretName: prow-job-ssh-private-key |
1 | 19 | periodics:
|
2 | 20 | - name: ci-kubernetes-unit-ppc64le
|
3 | 21 | interval: 1h
|
@@ -32,3 +50,103 @@ periodics:
|
32 | 50 | limits:
|
33 | 51 | cpu: 6
|
34 | 52 | memory: "28Gi"
|
| 53 | + |
| 54 | + - name: ci-kubernetes-ppc64le-conformance-latest-kubetest2 |
| 55 | + interval: 3h |
| 56 | + cluster: k8s-infra-ppc64le-prow-build |
| 57 | + labels: |
| 58 | + preset-ibmcloud-cred: "true" |
| 59 | + decorate: true |
| 60 | + decoration_config: |
| 61 | + timeout: 220m |
| 62 | + extra_refs: |
| 63 | + - base_ref: main |
| 64 | + org: kubernetes-sigs |
| 65 | + repo: provider-ibmcloud-test-infra |
| 66 | + workdir: true |
| 67 | + annotations: |
| 68 | + description: Runs conformance tests using kubetest2 against kubernetes ci latest on IBM powervs |
| 69 | + testgrid-dashboards: ibm-k8s-conformance-ppc64le, conformance-ppc64le |
| 70 | + testgrid-tab-name: ci-kubernetes-ppc64le-conformance-latest-kubetest2 |
| 71 | + spec: |
| 72 | + containers: |
| 73 | + - image: us-central1-docker.pkg.dev/k8s-staging-test-infra/images/kubekins-e2e:v20250227-3a13bdd784-master |
| 74 | + securityContext: |
| 75 | + privileged: true |
| 76 | + env: |
| 77 | + - name: "BOSKOS_HOST" |
| 78 | + value: "boskos.test-pods.svc.cluster.local" |
| 79 | + - name: "USER" |
| 80 | + value: "ci-kubernetes-ppc64le-conformance-latest-kubetest2" |
| 81 | + resources: |
| 82 | + requests: |
| 83 | + cpu: 4 |
| 84 | + memory: "14Gi" |
| 85 | + limits: |
| 86 | + cpu: 4 |
| 87 | + memory: "14Gi" |
| 88 | + command: |
| 89 | + - runner.sh |
| 90 | + args: |
| 91 | + - bash |
| 92 | + - -c |
| 93 | + - | |
| 94 | + set -o errexit |
| 95 | + set -o nounset |
| 96 | + set -o pipefail |
| 97 | + set -o xtrace |
| 98 | +
|
| 99 | + export PATH=$GOPATH/bin:$PATH |
| 100 | + export GO111MODULE=on |
| 101 | + RESOURCE_TYPE="powervs" |
| 102 | + #Call to boskos to checkout resource |
| 103 | + source "./hack/boskos.sh" |
| 104 | +
|
| 105 | + #Setup of kubetest2 tf deployer and ginkgo tester |
| 106 | + make install-deployer-tf |
| 107 | + go install sigs.k8s.io/kubetest2/kubetest2-tester-ginkgo@latest |
| 108 | +
|
| 109 | + #Install ansible required to bring up k8s cluster on infra |
| 110 | + apt-get update && apt-get install -y ansible |
| 111 | +
|
| 112 | + K8S_BUILD_VERSION=$(curl https://storage.googleapis.com/k8s-release-dev/ci/latest.txt) |
| 113 | +
|
| 114 | + TIMESTAMP=$(date +%s) |
| 115 | +
|
| 116 | + set +o errexit |
| 117 | + set -o xtrace |
| 118 | + kubetest2 tf --powervs-image-name CentOS-Stream-9 \ |
| 119 | + --powervs-region ${BOSKOS_REGION} --powervs-zone ${BOSKOS_ZONE} \ |
| 120 | + --powervs-service-id ${BOSKOS_RESOURCE_ID} \ |
| 121 | + --powervs-ssh-key k8s-pvs-sshkey \ |
| 122 | + --ssh-private-key /etc/secret-volume/ssh-privatekey \ |
| 123 | + --build-version $K8S_BUILD_VERSION \ |
| 124 | + --release-marker $K8S_BUILD_VERSION \ |
| 125 | + --cluster-name config1-$TIMESTAMP \ |
| 126 | + --workers-count 2 \ |
| 127 | + --up --auto-approve --retry-on-tf-failure 3 \ |
| 128 | + --break-kubetest-on-upfail true \ |
| 129 | + --powervs-memory 32 \ |
| 130 | + --test=ginkgo -- --parallel 10 --test-package-dir ci --test-package-version $K8S_BUILD_VERSION --focus-regex='\[Conformance\]' --skip-regex='\[Serial\]'; rc1=$? |
| 131 | +
|
| 132 | + export KUBECONFIG="$(pwd)/config1-$TIMESTAMP/kubeconfig" |
| 133 | + export ARTIFACTS=$ARTIFACTS/serial_tests_artifacts |
| 134 | + #Run Serial Conformance tests |
| 135 | + kubetest2 tf --powervs-region ${BOSKOS_REGION} --powervs-zone ${BOSKOS_ZONE} \ |
| 136 | + --powervs-service-id ${BOSKOS_RESOURCE_ID} \ |
| 137 | + --ignore-cluster-dir true \ |
| 138 | + --cluster-name config1-$TIMESTAMP \ |
| 139 | + --down --auto-approve --ignore-destroy-errors \ |
| 140 | + --test=ginkgo -- \ |
| 141 | + --test-package-dir ci \ |
| 142 | + --test-package-version $K8S_BUILD_VERSION --focus-regex='\[Serial\].*\[Conformance\]'; rc2=$? |
| 143 | +
|
| 144 | + [ -z "${BOSKOS_HOST:-}" ] || release_account >> "$ARTIFACTS/boskos.log" 2>&1 |
| 145 | +
|
| 146 | + if [ $rc1 != 0 ]; then |
| 147 | + echo "ERROR: Non Serial k8s Conformance tests exited with code: $rc1" |
| 148 | + exit $rc1 |
| 149 | + elif [ $rc2 != 0 ]; then |
| 150 | + echo "ERROR: Serial k8s Conformance tests exited with code: $rc2" |
| 151 | + exit $rc2 |
| 152 | + fi |
0 commit comments