-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpex-cloudbuild.yaml
33 lines (30 loc) · 1.13 KB
/
pex-cloudbuild.yaml
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
steps:
# Prepare config file with the version
- name: 'alpine'
env:
- 'VERSION=${_VERSION}'
args: ['sh', '-c', 'apk add gettext; envsubst <setup.cfg_cloud >setup.cfg']
# Build for a single Python version
- name: 'python:${_PY_VERSION}-alpine3.14'
args: ['sh', '-c', 'python -mvenv .env']
- name: 'python:${_PY_VERSION}-alpine3.14'
args: ['sh', '-c', '.env/bin/pip3 install -q -r requirements/base.txt']
- name: 'python:${_PY_VERSION}-alpine3.14'
entrypoint: sh
args:
- -c
- if [ ${_PY_VERSION} == "3.7" ]; then
.env/bin/pex --disable-cache . -r requirements/base.txt -c elastic-blast -o elastic-blast;
md5sum elastic-blast > elastic-blast.md5;
fi;
- name: 'python:${_PY_VERSION}-alpine3.14'
args: ['sh', '-c', '.env/bin/pex --disable-cache . -r requirements/base.txt -c elastic-blast -o elastic-blast${_PY_VERSION}']
- name: 'python:${_PY_VERSION}-alpine3.14'
args: ['sh', '-c', 'md5sum elastic-blast${_PY_VERSION} > elastic-blast${_PY_VERSION}.md5']
substitutions:
_TARGET: 'gs://elasticblast-test/builds'
artifacts:
objects:
location: '${_TARGET}/${_VERSION}'
paths:
- 'elastic-blast*'