-
Notifications
You must be signed in to change notification settings - Fork 21
/
codefresh.yml
46 lines (41 loc) · 1.41 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
version: '1.0'
steps:
BuildingDockerImage:
title: Building Docker Image
type: build
image_name: isaacmg/fb_scraper
working_directory: ./
dockerfile: Dockerfile
build-arguments:
- CACHE_DATE=$(date +%Y-%m-%d:%H:%M:%S)
RunningUnitTests:
title: Running Unit Tests
image: '${{BuildingDockerImage}}'
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: >-
# This bash script is executed within a freshly created docker container
that's derived from the image that you build. This means that on top
your code, all tools and resources that are provided by the image you
build are available to this script.
# Here's the place to execute commands that unit test your code and your
resources.
# The exit code of your script determines the outcome of the test;
Exiting with status code 0 will result in success, while exiting with
code 1 and above will result in a failure.
python threaded_proc.py
on_success:
metadata:
set:
- '${{BuildingDockerImage.imageId}}':
- CF_QUALITY: true
on_fail:
metadata:
set:
- '${{BuildingDockerImage.imageId}}':
- CF_QUALITY: false