-
Notifications
You must be signed in to change notification settings - Fork 37
/
codeship-steps.yml
107 lines (96 loc) · 3.32 KB
/
codeship-steps.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Pull previous builds from DockerHub to use as a cache.
# These images are tagged as [imagename]-cache
- name: pull-cache
service: image_builder
command: deployment/pull-cache.sh
# Build the python package to be tested (and uploaded to PyPI if this is a release)
# The package is built in the "autodesk/moldesign:moldesign_py_build-[branch name]" image
- name: build-sdist
service: image_builder
command: bash -c "docker-make moldesign_py_build
--tag dev
--keep-build-tags
-f DockerMakefiles/DockerMake.yml"
# Build docker images for all test environments. They will be tagged as
# [imagename]-dev
# (For the sake of parallelism, we also download other images that the tests depend on)
- name: build-and-pull-images
service: image_builder
type: parallel
steps:
- name: pull-dependent-images
command: deployment/pull-chemdocker.sh
- name: build_py3
command: bash -c
"docker-make moldesign_minimal moldesign_complete
-f DockerMakefiles/DockerMake.yml
--tag dev
--keep-build-tags
--cache-tag cache"
- name: build_py2
command: bash -c
"docker-make moldesign_minimal_py2 moldesign_complete_py2
-f DockerMakefiles/DockerMake.yml
--tag dev
--keep-build-tags
--cache-tag cache"
# Push build artifacts to Dockerhub.
# These are tagged as autodesk/moldesign:[imagename]-[branchame]-devbuild
# For testing purposes, they are also tagged as
# autodesk/moldesign:[imagename]-[branchname] (this is the tag that will be pushed
# to dockerhub for successful releases)
- name: tag-and-push-images
type: parallel
steps:
- name: push-artifacts
command: deployment/push-and-tag.sh
moldesign_minimal moldesign_minimal_py2 moldesign_py_build
moldesign_complete moldesign_complete_py2
service: publisher
- type: serial
name: make-notebook
steps:
- name: build-notebook
service: image_builder
command: bash -c
"docker-make moldesign_notebook
-f DockerMakefiles/DockerMake.yml
--tag dev
--cache-tag cache"
- name: push-notebook
service: publisher
command: deployment/push-and-tag.sh moldesign_notebook
# Run the tests in each environment
- name: run-tests
type: serial
services:
- test_moldesign_complete
- test_moldesign_complete_py2
- test_moldesign_minimal_py2
- test_moldesign_minimal
steps:
- command: deployment/print-environment.sh
name: environment
- command: deployment/run-ci-tests.sh
name: tests
# Upload coverage results
- name: push-coverage
service: coverage_pusher
command: deployment/push-coverage.sh
# If this build is tagged with a PEP440-compliant version number AND the tests have passed,
# upload the package to PyPI, and push the docker images to dockerhub as
# autodesk/moldesign:[imagename]-[version-number]
- name: release
# matches tags that are valid PEP440 versions
type: serial
tag: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)((a|rc|b)(0|[1-9]\d*))?$'
steps:
- type: parallel
services:
- test_moldesign_complete
- test_moldesign_complete_py2
steps:
- command: deployment/test-version-number.sh
- name: upload
command: deployment/publish.sh
service: publisher