test: Remove OCP4 test
Since api.ocp.ci.centos.org is going away: https://lists.centos.org/pipermail/ci-users/2022-June/004547.html. After discussion, OCP4 test will be removed here, but RHEL for Edge downstream test will keep OCP4 case
This commit is contained in:
parent
63a57ed383
commit
05503c58c2
3 changed files with 9 additions and 114 deletions
|
|
@ -251,9 +251,6 @@ install -m 0644 -vp test/data/koji/* %{buildroot}%
|
|||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/x509
|
||||
install -m 0644 -vp test/data/x509/* %{buildroot}%{_datadir}/tests/osbuild-composer/x509/
|
||||
|
||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/openshift
|
||||
install -m 0644 -vp test/data/openshift/* %{buildroot}%{_datadir}/tests/osbuild-composer/openshift/
|
||||
|
||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/schemas
|
||||
install -m 0644 -vp pkg/jobqueue/dbjobqueue/schemas/* %{buildroot}%{_datadir}/tests/osbuild-composer/schemas/
|
||||
|
||||
|
|
|
|||
|
|
@ -83,8 +83,6 @@ STAGE_REPO_ADDRESS=192.168.200.1
|
|||
STAGE_REPO_URL="http://${STAGE_REPO_ADDRESS}:8080/repo/"
|
||||
QUAY_REPO_URL="quay.io/osbuild/testing-rhel-edge-push"
|
||||
QUAY_REPO_TAG=$(tr -dc a-z0-9 < /dev/urandom | head -c 4 ; echo '')
|
||||
STAGE_OCP4_SERVER_NAME="edge-stage-server"
|
||||
STAGE_OCP4_REPO_URL="http://${STAGE_OCP4_SERVER_NAME}-${QUAY_REPO_TAG}-frontdoor.apps.ocp.ci.centos.org/repo/"
|
||||
ARTIFACTS="${ARTIFACTS:-/tmp/artifacts}"
|
||||
# For CS8, CS9, RHEL 8.5 and above
|
||||
CONTAINER_TYPE=edge-container
|
||||
|
|
@ -363,7 +361,6 @@ sudo rm -rf "$PROD_REPO"
|
|||
sudo mkdir -p "$PROD_REPO"
|
||||
sudo ostree --repo="$PROD_REPO" init --mode=archive
|
||||
sudo ostree --repo="$PROD_REPO" remote add --no-gpg-verify edge-stage "$STAGE_REPO_URL"
|
||||
sudo ostree --repo="$PROD_REPO" remote add --no-gpg-verify edge-stage-ocp4 "$STAGE_OCP4_REPO_URL"
|
||||
|
||||
# Prepare stage repo network
|
||||
greenprint "🔧 Prepare stage repo network"
|
||||
|
|
@ -428,35 +425,25 @@ EOF
|
|||
# Build container image.
|
||||
build_image container "$CONTAINER_TYPE" "${QUAY_REPO_URL}:${QUAY_REPO_TAG}" "$QUAY_CONFIG"
|
||||
|
||||
# Run stage repo in OCP4
|
||||
greenprint "Running stage repo in OCP4"
|
||||
oc login --token="${OCP_SA_TOKEN}" --server=https://api.ocp.ci.centos.org:6443 -n frontdoor
|
||||
oc process -f /usr/share/tests/osbuild-composer/openshift/edge-stage-server-template.yaml -p EDGE_STAGE_REPO_TAG="${QUAY_REPO_TAG}" -p EDGE_STAGE_SERVER_NAME="${STAGE_OCP4_SERVER_NAME}" | oc apply -f - || true
|
||||
# Run edge stage repo
|
||||
greenprint "🛰 Running edge stage repo"
|
||||
sudo podman pull --creds "${V2_QUAY_USERNAME}:${V2_QUAY_PASSWORD}" "docker://${QUAY_REPO_URL}:${QUAY_REPO_TAG}"
|
||||
sudo podman run -d --name rhel-edge --network edge --ip "$STAGE_REPO_ADDRESS" "${QUAY_REPO_URL}:${QUAY_REPO_TAG}"
|
||||
|
||||
# Wait until stage repo ready to use
|
||||
greenprint "Wait until stage repo is ready"
|
||||
for LOOP_COUNTER in $(seq 0 60); do
|
||||
RETURN_CODE=$(curl -o /dev/null -s -w "%{http_code}" "${STAGE_OCP4_REPO_URL}refs/heads/${OSTREE_REF}")
|
||||
if [[ $RETURN_CODE == 200 ]]; then
|
||||
echo "Stage repo is ready"
|
||||
break
|
||||
fi
|
||||
sleep 20
|
||||
done
|
||||
# Wait for container to be running
|
||||
until [ "$(sudo podman inspect -f '{{.State.Running}}' rhel-edge)" == "true" ]; do
|
||||
sleep 1;
|
||||
done;
|
||||
|
||||
# Sync installer edge content
|
||||
greenprint "📡 Sync installer content from stage repo"
|
||||
sudo ostree --repo="$PROD_REPO" pull --mirror edge-stage-ocp4 "$OSTREE_REF"
|
||||
sudo ostree --repo="$PROD_REPO" pull --mirror edge-stage "$OSTREE_REF"
|
||||
|
||||
# Clean compose and blueprints.
|
||||
greenprint "🧽 Clean up container blueprint and compose"
|
||||
sudo composer-cli compose delete "${COMPOSE_ID}" > /dev/null
|
||||
sudo composer-cli blueprints delete container > /dev/null
|
||||
|
||||
# Clean up OCP4
|
||||
greenprint " Clean up OCP4"
|
||||
oc delete pod,rc,service,route,dc -l app="${STAGE_OCP4_SERVER_NAME}-${QUAY_REPO_TAG}"
|
||||
|
||||
########################################################
|
||||
##
|
||||
## rhel-edge installer image building from container image
|
||||
|
|
|
|||
|
|
@ -1,89 +0,0 @@
|
|||
---
|
||||
apiVersion: template.openshift.io/v1
|
||||
kind: Template
|
||||
labels:
|
||||
app: ${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}
|
||||
template: ${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}
|
||||
metadata:
|
||||
annotations:
|
||||
description: edge stage repo server
|
||||
name: edge-stage-server
|
||||
|
||||
objects:
|
||||
- kind: Route
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: ${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}
|
||||
annotations:
|
||||
template.openshift.io/expose-uri: http://{.spec.host}{.spec.path}
|
||||
spec:
|
||||
to:
|
||||
kind: Service
|
||||
name: ${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}
|
||||
- kind: DeploymentConfig
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: ${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
name: ${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: ${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}
|
||||
spec:
|
||||
containers:
|
||||
- name: ${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}
|
||||
image: quay.io/osbuild/testing-rhel-edge-push:${EDGE_STAGE_REPO_TAG}
|
||||
imagePullPolicy: Always
|
||||
resources:
|
||||
limits:
|
||||
memory: "1Gi"
|
||||
cpu: "1"
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "50m"
|
||||
securityContext:
|
||||
capabilities: {}
|
||||
privileged: false
|
||||
terminationMessagePath: /dev/termination-log
|
||||
imagePullSecrets:
|
||||
- name: osbuild-quay-edge-pull
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
triggers:
|
||||
- type: "ConfigChange"
|
||||
- kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: "${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}"
|
||||
annotations:
|
||||
service.alpha.openshift.io/dependencies: '[{"name": "${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}",
|
||||
"namespace": "", "kind": "Service"}]'
|
||||
service.openshift.io/infrastructure: 'true'
|
||||
creationTimestamp:
|
||||
spec:
|
||||
ports:
|
||||
- name: web
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
nodePort: 0
|
||||
selector:
|
||||
name: "${EDGE_STAGE_SERVER_NAME}-${EDGE_STAGE_REPO_TAG}"
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
sessionAffinity: None
|
||||
|
||||
parameters:
|
||||
- description: Edge stage repo server.
|
||||
displayName: Edge stage repo server
|
||||
name: EDGE_STAGE_SERVER_NAME
|
||||
value: edge-stage-server
|
||||
- description: Edge stage repo tag.
|
||||
displayName: Edge stage repo tag
|
||||
name: EDGE_STAGE_REPO_TAG
|
||||
value: latest
|
||||
Loading…
Add table
Add a link
Reference in a new issue