-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de784dc
commit 4e516a7
Showing
1 changed file
with
43 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
<testsuite tests="1"> | ||
<testcase classname="dummy" name="dummytest"/> | ||
</testsuite> | ||
EOF | ||
# Build and publish container image | ||
source "$CICD_ROOT/build.sh" | ||
## Roll out ephemeral env | ||
source "$CICD_ROOT/deploy_ephemeral_env.sh" |