Compare commits

...

1 Commits

Author SHA1 Message Date
Thomas Carmet d6bca4940e setting up testrail upload 2019-07-25 11:00:19 -07:00
2 changed files with 49 additions and 3 deletions

View File

@ -99,8 +99,8 @@ models:
- ShellCommand: &setup-junit-upload - ShellCommand: &setup-junit-upload
name: preparing junit files for upload name: preparing junit files for upload
command: | command: |
mkdir -p artifacts/junit mkdir -p artifacts/junit/%(prop:stage_name)s
find . -name "*junit*.xml" -exec cp {} artifacts/junit/ ";" find . -name "*junit*.xml" -exec cp {} artifacts/junit/%(prop:stage_name)s/ ";"
alwaysRun: true alwaysRun: true
- Upload: &upload-junits - Upload: &upload-junits
source: artifacts source: artifacts
@ -121,7 +121,12 @@ stages:
- multiple-backend-test - multiple-backend-test
- mongo-ft-tests - mongo-ft-tests
waitForFinish: True waitForFinish: True
haltOnFailure: True
- TriggerStages:
name: Upload testrail reports
stage_names:
- testrail-upload
waitForFinish: True
linting-coverage: linting-coverage:
worker: worker:
@ -309,3 +314,21 @@ stages:
command: | command: |
docker push %(prop:docker_image_name)s docker push %(prop:docker_image_name)s
docker push zenko/cloudserver:latest-%(prop:product_version)s docker push zenko/cloudserver:latest-%(prop:product_version)s
testrail-upload:
worker:
type: kube_pod
path: eve/workers/testrail.yaml
steps:
- ShellCommand:
name: upload reports
command: |
testrail -r "%(prop:artifacts_private_url)s/junit/linting-coverage" -n "linting-coverage %(prop:bootstrap)s"
testrail -r "%(prop:artifacts_private_url)s/junit/file-ft-tests" -n "file-ft-tests %(prop:bootstrap)s"
testrail -r "%(prop:artifacts_private_url)s/junit/multiple-backend-test" -n "multiple-backend-test %(prop:bootstrap)s"
testrail -r "%(prop:artifacts_private_url)s/junit/mongo-ft-tests" -n "mongo-ft-tests %(prop:bootstrap)s"
env:
TESTRAIL_LOGIN: '%(secret:testrail_login)s'
TESTRAIL_KEY: '%(secret:testrail_key)s'
warnOnFailure: true
flunkOnFailure: false

23
eve/workers/testrail.yaml Normal file
View File

@ -0,0 +1,23 @@
---
apiVersion: v1
kind: Pod
metadata:
name: worker
spec:
containers:
- name: testrail
image: registry.oci.scality.net/testrail/testrail:0.0.1-alpha3
command: ["/bin/sh", "-c", "buildbot-worker create-worker . ${BUILDMASTER}:${BUILDMASTER_PORT} ${WORKERNAME} ${WORKERPASS} && buildbot-worker start --nodaemon"]
resources:
requests:
cpu: "250m"
memory: 1Gi
limits:
cpu: "1"
memory: 1Gi
volumeMounts:
- name: worker-workspace
mountPath: "%(prop:builddir)s"
volumes:
- name: worker-workspace
emptyDir: {}