Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bdd test pipeline #105

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .tekton/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,18 @@ spec:
workspaces:
- name: source
workspace: pipeline-workspace
- name: run-behave
params:
- name: BASE_URL
value: >-
https://promotion-yc6380-dev.apps.sandbox-m4.g2pi.p1.openshiftapps.com/
runAfter:
- deploy-image
taskRef:
kind: Task
name: run-behave
workspaces:
- name: source
workspace: pipeline-workspace
workspaces:
- name: pipeline-workspace
46 changes: 46 additions & 0 deletions .tekton/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,49 @@ 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: run-behave
labels:
app.kubernetes.io/version: "0.1"
annotations:
tekton.dev/categories: Testing
tekton.dev/pipelines.minVersion: "0.17.0"
tekton.dev/tags: test, behave
tekton.dev/displayName: "behave tests"
tekton.dev/platforms: "linux/amd64"
spec:
workspaces:
- name: source
description: >-
This task will run the usecase scenarios automatically
params:
- name: BASE_URL
description: The base url to the promotion microservice
type: string
default: "https://promotion-yc6380-dev.apps.sandbox-m4.g2pi.p1.openshiftapps.com/"
steps:
- name: run
image: docker.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 30
curl -L -I $(params.BASE_URL)

echo "***** Running BDD *****"
behave
Loading