From 4e516a70e8ccdb7d497b095783ecfa31349adfce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Maro=C5=A1i?= Date: Mon, 8 Jul 2024 09:58:20 +0200 Subject: [PATCH] Update pr-check.yaml --- konflux/pr-check.yaml | 69 +++++++++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/konflux/pr-check.yaml b/konflux/pr-check.yaml index ae0500c2..991ac2f5 100644 --- a/konflux/pr-check.yaml +++ b/konflux/pr-check.yaml @@ -1,32 +1,49 @@ kind: Pipeline -apiVersion: tekton.dev/v1beta1 +apiVersion: "tekton.dev/v1beta1" +version: v1 metadata: name: chrome-service-pr-check spec: params: - - description: 'Snapshot of the application' - name: SNAPSHOT - default: '{"components": [{"name":"test-app", "containerImage": "quay.io/example/repo:latest"}]}' - type: string + - name: CICD_REPO_BRANCH + value: chrome-service-backend/main + - name: CICD_REPO_ORG + value: RedHatInsights tasks: - - name: task-1 - description: Placeholder task that prints the Snapshot and outputs standard TEST_OUTPUT - params: - - name: SNAPSHOT - value: $(params.SNAPSHOT) - taskSpec: - params: - - name: SNAPSHOT - results: - - name: TEST_OUTPUT - description: Test output - steps: - - image: registry.redhat.io/openshift4/ose-cli:latest - env: - - name: SNAPSHOT - value: $(params.SNAPSHOT) - script: | - echo -e "Running clowder PR check" - pwd - ls - ./pr_check.sh + - name: install bonfire and clowder + script: | + #!/bin/bash + # -------------------------------------------- + # Options that must be configured by app owner + # -------------------------------------------- + export APP_NAME="chrome-service" # name of app-sre "application" folder this component lives in + export COMPONENT_NAME="chrome-service" # name of app-sre "resourceTemplate" in deploy.yaml for this component + export IMAGE="quay.io/cloudservices/chrome-service" + export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace + export APP_ROOT=$(pwd) + + # IQE_PLUGINS="e2e" + # IQE_MARKER_EXPRESSION="smoke" + # IQE_FILTER_EXPRESSION="" + # IQE_CJI_TIMEOUT="30m" + + + echo "FOOBAR" + + # Install bonfire repo/initialize + CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd + curl $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh + + # Need to make a dummy results file to make tests pass + mkdir -p "WORKSPACE" + cat << EOF > "$WORKSPACE/artifacts/junit-dummy.xml" + + + + EOF + + # Build and publish container image + source "$CICD_ROOT/build.sh" + + ## Roll out ephemeral env + source "$CICD_ROOT/deploy_ephemeral_env.sh"