-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
135 lines (122 loc) · 5.01 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
language: python
services:
- docker
install: echo "no install"
stages:
- name: test
if: tag IS blank
- name: image
if: branch = main AND type != pull_request
- name: multiarch
if: branch = main AND type != pull_request
- name: deploy-to-dev
if: branch = main AND type != pull_request
- name: new-git-release
if: tag is present
before_script:
- export DOCKER_REGISTRY=${DOCKER_REGISTRY:-quay.io}
- export IMAGE_NAME=${IMAGE_NAME:-/st4sd/official-base/st4sd-runtime-service}
- export IMAGE_BASE_URL="${DOCKER_REGISTRY}${IMAGE_NAME}"
- export RUNTIMECORE_IMAGE_NAME=${ROOT_IMAGE_NAME:-/st4sd/official-base/st4sd-runtime-core}
- export RUNTIMECORE_URL="${DOCKER_REGISTRY}${RUNTIMECORE_IMAGE_NAME}"
matrix:
include:
- stage: test
services:
- docker
env:
- BUILD_PYTHON_VERSION=37
script:
- docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_TOKEN}" "${DOCKER_REGISTRY}"
- docker build -t ${IMAGE_BASE_URL}:py${BUILD_PYTHON_VERSION} -f Dockerfile .
- docker build -t ${IMAGE_BASE_URL}:py${BUILD_PYTHON_VERSION}-test
--build-arg base_image=${IMAGE_BASE_URL}:py${BUILD_PYTHON_VERSION} -f Dockerfile.test .
- stage: test
services:
- docker
env:
BUILD_PYTHON_VERSION=310
script:
- docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_TOKEN}" "${DOCKER_REGISTRY}"
- docker build -t ${IMAGE_BASE_URL}:py${BUILD_PYTHON_VERSION} -f Dockerfile .
- docker build -t ${IMAGE_BASE_URL}:py${BUILD_PYTHON_VERSION}-test
--build-arg base_image=${IMAGE_BASE_URL}:py${BUILD_PYTHON_VERSION} -f Dockerfile.test .
- stage: image
os: linux
python: "3.7"
env:
- BUILD_PYTHON_VERSION=37
script:
- docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_TOKEN}" "${DOCKER_REGISTRY}"
- docker build --pull -t ${IMAGE_BASE_URL}:py${BUILD_PYTHON_VERSION}-latest-`arch` -f Dockerfile .
--build-arg base_image=${RUNTIMECORE_URL}:py${BUILD_PYTHON_VERSION}-latest-`arch`
- docker push ${IMAGE_BASE_URL}:py${BUILD_PYTHON_VERSION}-latest-`arch`
- stage: image
os: linux
python: "3.10"
env:
- BUILD_PYTHON_VERSION=310
script:
- docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_TOKEN}" "${DOCKER_REGISTRY}"
- docker build --pull -t ${IMAGE_BASE_URL}:py${BUILD_PYTHON_VERSION}-latest-`arch` -f Dockerfile .
--build-arg base_image=${RUNTIMECORE_URL}:py${BUILD_PYTHON_VERSION}-latest-`arch`
- docker push ${IMAGE_BASE_URL}:py${BUILD_PYTHON_VERSION}-latest-`arch`
# VV: Disabling PPC64LE builds for now
#- stage: image
# os: linux-ppc64le
# script:
#- docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_TOKEN}" "${DOCKER_REGISTRY}"
#- docker build --pull -t ${IMAGE_BASE_URL}:latest-`arch` -f Dockerfile .
# --build-arg base_image=${RUNTIMECORE_URL}
#- docker push ${IMAGE_BASE_URL}:latest-`arch`
- stage: multiarch
os: linux
python: "3.10"
env:
- BUILD_PYTHON_VERSION=310
script:
- export SRC_TAG_X8664="py${BUILD_PYTHON_VERSION}-latest-x86_64"
- export DST_TAG_X8664="py${BUILD_PYTHON_VERSION}-x86_64"
# VV: Disable ppc64le builds for now
#- export SRC_TAG_PPC64LE="latest-ppc64le"
#- export DST_TAG_PPC64LE="ppc64le"
- export LABEL="py${BUILD_PYTHON_VERSION}-latest"
# VV: Also push as `x86_64` and `latest`
- ./deploy/build_multiarch.sh x86_64 latest
- stage: multiarch
os: linux
python: "3.7"
env:
- BUILD_PYTHON_VERSION=37
script:
- export SRC_TAG_X8664="py${BUILD_PYTHON_VERSION}-latest-x86_64"
- export DST_TAG_X8664="py${BUILD_PYTHON_VERSION}-x86_64"
# VV: Disable ppc64le builds for now
#- export SRC_TAG_PPC64LE="latest-ppc64le"
#- export DST_TAG_PPC64LE="ppc64le"
- export LABEL="py${BUILD_PYTHON_VERSION}-latest"
- ./deploy/build_multiarch.sh
- stage: deploy-to-dev
os: linux
env:
DEPLOY_TO="ve-5446-dev"
script:
- ./deploy/redeploy_deploymentconfig.sh
"${VE_5446_DEV_PROJECT}" "${VE_5446_DEV_LOGIN_URL}" "${VE_5446_DEV_LOGIN_TOKEN}"
- stage: new-git-release
os: linux
services: docker
script:
- export DOCKER_CLI_EXPERIMENTAL=enabled
- cd deploy
- export IMAGE_SRC="${IMAGE_BASE_URL}:latest"
- export IMAGE_DEST="${IMAGE_BASE_URL}:${TRAVIS_TAG}"
- docker run --rm -it
--env DOCKER_REGISTRY --env DOCKER_TOKEN --env DOCKER_USERNAME
-v `pwd`:/scripts -w /scripts --entrypoint /scripts/skopeo_copy.sh quay.io/skopeo/stable
${IMAGE_SRC} ${IMAGE_DEST}
- export IMAGE_DEST="${IMAGE_BASE_URL}:release-candidate"
- docker run --rm -it
--env DOCKER_REGISTRY --env DOCKER_TOKEN --env DOCKER_USERNAME
-v `pwd`:/scripts -w /scripts --entrypoint /scripts/skopeo_copy.sh quay.io/skopeo/stable
${IMAGE_SRC} ${IMAGE_DEST}