-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
219 lines (212 loc) · 7.99 KB
/
.travis.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
language: python
stages:
- name: test
if: tag is blank
- name: image
if: (branch = main AND type != pull_request) OR (tag IS present)
- name: multiarch
if: (branch = main AND type != pull_request) OR (tag IS present)
- name: release_candidate_image
if: tag is present
before_script:
- export GIT_ORG=$(dirname ${TRAVIS_REPO_SLUG})
- export GIT_REPO=$(basename ${TRAVIS_REPO_SLUG})
- export IMG_RUNTIME_CORE=${GIT_REPO}
- export DOCKER_REGISTRY=${DOCKER_REGISTRY:-quay.io}
- export IMAGE_NAME=${IMAGE_NAME:-/st4sd/official-base/${IMG_RUNTIME_CORE}}
- export IMAGE_BASE_URL="${DOCKER_REGISTRY}${IMAGE_NAME}"
jobs:
include:
# VV: TODO Remove python 3.7 tests
- python: "3.7"
env: TOXENV=py37-testA-ibm
- python: "3.7"
env: TOXENV=py37-testB-ibm
- python: "3.7"
env: TOXENV=py37-testC-ibm
- python: "3.9.15"
env: TOXENV=py39-testA-ibm
- python: "3.9.15"
env: TOXENV=py39-testB-ibm
- python: "3.9.15"
env: TOXENV=py39-testC-ibm
- python: "3.10"
env: TOXENV=py310-testA-ibm
- python: "3.10"
env: TOXENV=py310-testB-ibm
- python: "3.10"
env: TOXENV=py310-testC-ibm
# VV: TODO Remove python 3.7 image
- stage: image
os: linux
python: "3.7"
env:
- BUILD_PYTHON_VERSION=37
services:
- docker
script:
- git clone [email protected]:hartreechem/deploy.git deploy_repo
- cd deploy_repo
- tox -e py${BUILD_PYTHON_VERSION}
- source toxenv/bin/activate
- cd ..
- if [ ! -z "${TRAVIS_TAG}" ]; then
export PUSH_IMAGE_TAG="${TRAVIS_TAG}-py${BUILD_PYTHON_VERSION}";
else
export PUSH_IMAGE_TAG="py${BUILD_PYTHON_VERSION}";
fi
- if [ "${BUILD_PYTHON_VERSION}" = "37" ]; then
export DOCKERFILE_PATH="py37.Dockerfile";
export PUSH_PIP_WHEEL_TOO=no;
export BASE_LAYER=ubuntu:18.04;
else
export DOCKERFILE_PATH="Dockerfile";
export PUSH_PIP_WHEEL_TOO=yes;
export BASE_LAYER=ubuntu:22.04;
fi
- export IMAGE_URL="${IMAGE_BASE_URL}:${PUSH_IMAGE_TAG}-`arch`"
- DEPLOY_ACCESS_TOKEN=$GIT_ACCESS_TOKEN deprepo.py -p artifactory-py${BUILD_PYTHON_VERSION}-intel
-o ${GIT_ORG} -r ${GIT_REPO} -d deploy/ st4sd-runtime-core-image.deploy -c --disableContexts
--payload=deploy/creation_payload.json
--deploymentMessage="Deployment to artifactory-py${BUILD_PYTHON_VERSION}-intel created by travis" --streamOutput
- cat *.log
- stage: image
os: linux
python: "3.10"
env:
- BUILD_PYTHON_VERSION=310
services:
- docker
script:
- git clone [email protected]:hartreechem/deploy.git deploy_repo
- cd deploy_repo
- tox -e py${BUILD_PYTHON_VERSION}
- source toxenv/bin/activate
- cd ..
- if [ ! -z "${TRAVIS_TAG}" ]; then
export PUSH_IMAGE_TAG="${TRAVIS_TAG}-py${BUILD_PYTHON_VERSION}";
else
export PUSH_IMAGE_TAG="py${BUILD_PYTHON_VERSION}";
fi
- if [ "${BUILD_PYTHON_VERSION}" = "37" ]; then
export DOCKERFILE_PATH="py37.Dockerfile";
export PUSH_PIP_WHEEL_TOO=no;
export BASE_LAYER=ubuntu:18.04;
else
export DOCKERFILE_PATH="Dockerfile";
export PUSH_PIP_WHEEL_TOO=yes;
export BASE_LAYER=ubuntu:22.04;
fi
- export IMAGE_URL="${IMAGE_BASE_URL}:${PUSH_IMAGE_TAG}-`arch`"
- DEPLOY_ACCESS_TOKEN=$GIT_ACCESS_TOKEN deprepo.py -p artifactory-py${BUILD_PYTHON_VERSION}-intel
-o ${GIT_ORG} -r ${GIT_REPO} -d deploy/ st4sd-runtime-core-image.deploy -c --disableContexts
--payload=deploy/creation_payload.json
--deploymentMessage="Deployment to artifactory-py${BUILD_PYTHON_VERSION}-intel created by travis" --streamOutput
- cat *.log
# VV: Temporarily disabling ppc64le because of issues installing numpy and ppc64le
# - stage: image
# os: linux-ppc64le
# python: 3.7
# services:
# - docker
# script:
# - git clone [email protected]:hartreechem/deploy.git deploy_repo
# - cd deploy_repo
# - tox -e py37
# - source toxenv/bin/activate
# - cd ..
# - export GIT_ORG=$(dirname ${TRAVIS_REPO_SLUG})
# - export GIT_REPO=$(basename ${TRAVIS_REPO_SLUG})
# - export IMG_RUNTIME_CORE=${GIT_REPO}
# - DEPLOY_ACCESS_TOKEN=$GIT_ACCESS_TOKEN deprepo.py -p artifactory-py37-power -o ${GIT_ORG} -r ${GIT_REPO}
# -d deploy/ st4sd-runtime-core-image.deploy -c --disableContexts --payload=deploy/creation_payload.json
# --deploymentMessage="Deployment to artifactory-py37-power created by travis" --streamOutput
# - cat *.log
# VV: TODO Remove python 3.7 image
- stage: multiarch
os: linux
python: "3.7"
env:
- BUILD_PYTHON_VERSION=37
services:
- docker
script:
- git clone [email protected]:hartreechem/deploy.git deploy_repo
- cd deploy_repo
- tox -e py${BUILD_PYTHON_VERSION}
- source toxenv/bin/activate
- cd ..
- if [ ! -z "${TRAVIS_TAG}" ]; then
export PUSH_IMAGE_TAG="${TRAVIS_TAG}-py${BUILD_PYTHON_VERSION}";
export PUSH_MANIFEST_TAG="${TRAVIS_TAG}";
else
export PUSH_IMAGE_TAG="py${BUILD_PYTHON_VERSION}";
export PUSH_MANIFEST_TAG="latest";
fi
- export IMAGE_URL="${IMAGE_BASE_URL}:${PUSH_IMAGE_TAG}-`arch`"
# VV: use the py310 variant as `latest`
- if [ "${BUILD_PYTHON_VERSION}" = "310" ]; then
export PUSH_LATEST_TOO=yes;
else
export PUSH_LATEST_TOO=no;
fi
- DEPLOY_ACCESS_TOKEN=$GIT_ACCESS_TOKEN deprepo.py -p artifactory-py${BUILD_PYTHON_VERSION}-multiarch
-o ${GIT_ORG} -r ${GIT_REPO} -d deploy/ st4sd-runtime-core-multiarch.deploy -c --disableContexts
--payload=deploy/creation_payload.json
--deploymentMessage="Deployment to artifactory-py${BUILD_PYTHON_VERSION}-multiarch created by travis"
- cat *.log
- stage: multiarch
os: linux
python: "3.10"
env:
- BUILD_PYTHON_VERSION=310
services:
- docker
script:
- git clone [email protected]:hartreechem/deploy.git deploy_repo
- cd deploy_repo
- tox -e py${BUILD_PYTHON_VERSION}
- source toxenv/bin/activate
- cd ..
- if [ ! -z "${TRAVIS_TAG}" ]; then
export PUSH_IMAGE_TAG="${TRAVIS_TAG}-py${BUILD_PYTHON_VERSION}";
export PUSH_MANIFEST_TAG="${TRAVIS_TAG}";
else
export PUSH_IMAGE_TAG="py${BUILD_PYTHON_VERSION}";
export PUSH_MANIFEST_TAG="latest";
fi
- export IMAGE_URL="${IMAGE_BASE_URL}:${PUSH_IMAGE_TAG}-`arch`"
# VV: use the py310 variant as `latest`
- if [ "${BUILD_PYTHON_VERSION}" = "310" ]; then
export PUSH_LATEST_TOO=yes;
else
export PUSH_LATEST_TOO=no;
fi
- DEPLOY_ACCESS_TOKEN=$GIT_ACCESS_TOKEN deprepo.py -p artifactory-py${BUILD_PYTHON_VERSION}-multiarch
-o ${GIT_ORG} -r ${GIT_REPO} -d deploy/ st4sd-runtime-core-multiarch.deploy -c --disableContexts
--payload=deploy/creation_payload.json
--deploymentMessage="Deployment to artifactory-py${BUILD_PYTHON_VERSION}-multiarch created by travis"
- cat *.log
- stage: release_candidate_image
before_install: []
os: linux
services: docker
python: "3.7"
script:
- git clone [email protected]:hartreechem/deploy.git deploy_repo
- cd deploy_repo
- tox -e py310
- source toxenv/bin/activate
- cd ..
- export PUSH_MANIFEST_TAG="${TRAVIS_TAG}"
- DEPLOY_ACCESS_TOKEN=$GIT_ACCESS_TOKEN deprepo.py -p artifactory-release -o ${GIT_ORG} -r ${GIT_REPO}
-d deploy/ st4sd-runtime-core-release-tag.deploy -c --disableContexts --payload=deploy/creation_payload.json
--deploymentMessage="Deployment to artifactory-release created by travis"
- cat *.log
install:
# VV: Upgrade pip, virtualenv, six, and tox JUST in case
- pip install --upgrade pip virtualenv six tox
script:
- tox -e $TOXENV
notifications:
slack: ibm-research:d4pUqklOVpRT9PDqRsK9BQGd