Skip to content

Commit

Permalink
add behave tekton task
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbo-bao committed Dec 12, 2023
1 parent 5264bc8 commit fb67c02
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .tekton/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,47 @@ spec:
echo Applying manifests in $(inputs.params.manifest_dir) directory
oc apply -f $(inputs.params.manifest_dir)
echo -----------------------------------
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: behave
labels:
app.kubernetes.io/version: "0.1"
annotations:
tekton.dev/categories: Deployment
tekton.dev/pipelines.minVersion: "0.17.0"
tekton.dev/tags: python, behave
tekton.dev/displayName: "behave tests"
tekton.dev/platforms: "linux/amd64"
spec:
workspaces:
- name: source
description: >-
This task can be used to perform bdd integration tests with behave.
params:
- name: BASE_URL
description: The base url to product microservice
type: string
default: "https://products-hao-li-dev.apps.sandbox-m3.1530.p1.openshiftapps.com/"
steps:
- name: behave
image: quay.io/rofrano/pipeline-selenium
workingDir: /workspace/source
command: ["/bin/bash", "-c"]
env:
- name: BASE_URL
value: "$(params.BASE_URL)"
args:
- |-
#!/bin/bash
set -e
echo "***** Installing dependencies *****"
python -m pip install --upgrade pip wheel
pip install -qr requirements.txt
echo "\n*** STARTING APPLICATION ***\n"
sleep 5
curl -i $(params.BASE_URL)
echo "***** Running BDD *****"
behave

0 comments on commit fb67c02

Please sign in to comment.