forked from Codefresh-Examples/demochat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
codefresh.yml
63 lines (56 loc) · 1.6 KB
/
codefresh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: '1.0'
steps:
BuildImage:
title: Building Docker Image
type: build
image_name: codefresh/demochat
working_directory: ./
dockerfile: Dockerfile
tag: '${{CF_SHORT_REVISION}}'
Show_varsss:
image: alpine
title: 'show vars'
commands:
- printenv
when:
branch:
only:
- master
AddCustomReport:
title: 'add custom report'
image: '${{BuildImage}}'
working_directory: /codefresh/volume/
# for demonstration of upload multiple reports create some test results
commands:
- rm -rf testDir
- mkdir testDir && cd ./testDir
- echo 'Test report uploaded' > index.html
RunningUnitTests:
title: Running Unit Tests
fail_fast: false
image: '${{BuildImage}}'
working_directory: IMAGE_WORK_DIR
entry_point:
- /bin/sh
- /codefresh/volume/cf-generated/unit_test_script
create_file:
path: /codefresh/volume/cf-generated
name: unit_test_script
content: npm test && cp -r -f ./mochawesome-report /codefresh/volume/
unit_test_reporting_step:
title: "Generate test reporting"
image: codefresh/cf-docker-test-reporting:latest
working_directory: /codefresh/volume/
environment:
- REPORT_DIR=mochawesome-report
- REPORT_INDEX_FILE=mochawesome.html
#- REPORT_DIR.0=testDir
#- REPORT_INDEX_FILE.0=index.html
#- REPORT_TYPE.0=naher
#- ALLURE_DIR.1=allure-results
#- REPORT_TYPE.1=allure
#- REPORT_DIR.2=testDir
#- REPORT_INDEX_FILE.2=index.html
#- REPORT_TYPE.2=cucumber
- BUCKET_NAME=test777774444/one/two
- CF_STORAGE_INTEGRATION=json