forked from screwdriver-cd-test/quickstart-generic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screwdriver.yaml
194 lines (179 loc) · 6.82 KB
/
screwdriver.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
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
---
shared:
image: centos:8
annotations:
screwdriver.cd/cpu: HIGH
screwdriver.cd/ram: HIGH
screwdriver.cd/timeout: 60
jobs:
sample-apps:
image: docker.io/vespaengine/vespa-pipeline:latest
#requires: [~commit]
annotations:
screwdriver.cd/cpu: HIGH
screwdriver.cd/ram: HIGH
secrets:
- ALBUM_RECOMMENDATION_JAVA_DEPLOY_KEY
steps:
- clone: |
git clone https://github.com/vespa-engine/sample-apps
cd sample-apps
- compile: |
travis/compile-and-test.sh
- deploy: |
if [[ -z $SD_PULL_REQUEST ]]; then
travis/deploy-album-recommendation-searcher.sh
fi
system-test:
image: docker.io/vespaengine/vespa-build-centos7:latest
#requires: [~commit]
annotations:
screwdriver.cd/cpu: LOW
screwdriver.cd/ram: LOW
steps:
- clone: |
git clone https://github.com/vespa-engine/system-test
cd system-test
- test: |
ln -sf $(pwd) /source
travis/run-unit-tests.sh
test-documentation:
image: vespaengine/vespa-pipeline
#requires: [~commit]
annotations:
screwdriver.cd/timeout: 300
screwdriver.cd/cpu: 4
screwdriver.cd/ram: 8
screwdriver.cd/dockerEnabled: true
screwdriver.cd/dockerCpu: TURBO
screwdriver.cd/dockerRam: TURBO
secrets:
- VESPA_TEAM_API_KEY
steps:
- set-x: set -x
- try-docker: |
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce-cli
export DOCKER_HOST="localhost:2375"
docker system info
ls -la $SD_DIND_SHARE_PATH
mount
df -h
pwd
docker run --privileged --memory 8G --rm -ti alpine cat /etc/alpine-release
- test: |
yum install -y git
git clone https://github.com/vespa-engine/documentation
cd documentation
yum install -y python36-pip
pip3 install -qqq --upgrade pip
pip3 install -qqq -r test/requirements.txt --user
# Some procedures use openssl
yum install -y openssl
cd $SD_DIND_SHARE_PATH
#cat $SD_SOURCE_DIR/documentation/test/_test_config.yml | grep -E "(^urls|docs.vespa.ai|raw.githubusercontent.com)" > _test_config.yml
cp $SD_SOURCE_DIR/documentation/test/_test_config.yml .
# Run all tests
$SD_SOURCE_DIR/documentation/test/test.py
test-pyvespa:
#requires: [~commit]
image: docker.io/centos:8
annotations:
screwdriver.cd/timeout: 300
screwdriver.cd/cpu: 7
screwdriver.cd/ram: 16
screwdriver.cd/dockerEnabled: true
screwdriver.cd/dockerCpu: TURBO
screwdriver.cd/dockerRam: TURBO
environment:
PYVESPA_VERSION: 0.2
DOCKER_HOST: "localhost:2375"
secrets:
- VESPA_TEAM_API_KEY
steps:
- clone: |
dnf install -y git
git clone https://github.com/vespa-engine/pyvespa
cd pyvespa
#export WORK_DIR=$(pwd)
export WORK_DIR=$SD_DIND_SHARE_PATH
export RESOURCES_DIR=$(pwd)/vespa/resources
export VESPA_CLOUD_USER_KEY=$VESPA_TEAM_API_KEY
- install-docker: |
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y docker-ce-cli
docker system info
ls -la $SD_DIND_SHARE_PATH
- install-python: |
dnf install -y python38-pip
dnf install -y --enablerepo=powertools pandoc
- link-check-html-build: |
dnf install -y --enablerepo=powertools pandoc
pip3 install -r docs/sphinx/source/requirements.txt
sphinx-build -E -b linkcheck docs/sphinx/source docs/sphinx/build
sphinx-build -E docs/sphinx/source docs/sphinx/build
- run-doc-tests: |
pip3 install pytest
pip3 install -e .[full]
pytest --doctest-modules --ignore-glob=vespa/test_*.py
- run-unit-tests: |
pip3 install -e .[full]
pytest --ignore-glob=vespa/test_integration*.py
- run-notebooks-except-cloud-related: |
pip3 install notebook nbconvert
pip3 install -e .[full]
pip3 install -r docs/sphinx/source/notebook_requirements.txt
find docs -name '*.ipynb' ! -name '*cloud*.ipynb'
find docs -name '*.ipynb' ! -name '*cloud*.ipynb' -exec jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=1000 --execute {} +
find docs -name '*.nbconvert.ipynb' -exec rm {} +
- run-integration-running-instance: |
pip3 install -e .[full]
pytest vespa/test_integration_running_instance.py
- run-integration-docker: |
docker pull vespaengine/vespa
pip3 install -e .[full]
pytest vespa/test_integration_docker.py
test-podman:
#requires: [~pr, ~commit]
steps:
- set-x: set -x
- try-podman: |
dnf install -y podman
sed -i 's,"overlay","vfs",' /etc/containers/storage.conf
podman --log-level=debug ps -a
podman run --net=host --events-backend=file --cgroup-manager=cgroupfs --rm docker.io/alpine cat /etc/alpine-release
podman run --net=host --events-backend=file --cgroup-manager=cgroupfs --rm --entrypoint bash vespaengine/vespa /opt/vespa/bin/vespa-start-configserver
test-podman-2:
image: docker.io/vespaengine/vespa-build-centos-stream8:latest
annotations:
screwdriver.cd/timeout: 10
screwdriver.cd/dockerEnabled: true
screwdriver.cd/dockerCpu: HIGH
screwdriver.cd/dockerRam: HIGH
requires: [~pr, ~commit]
steps:
- set-x: set -x
- inspect: |
whoami
uname -a
- install-podman-multi-arch: |
dnf install -y podman podman-docker buildah skopeo crun
sed -i 's,.*netns.*=.*private.*,netns = "host",' /usr/share/containers/containers.conf
touch /etc/containers/nodocker
#mount --make-rshared /
#podman run --rm --quiet --cap-add SYS_ADMIN docker.io/multiarch/qemu-user-static --reset -p yes
#podman run --net=host --events-backend=file --cgroup-manager=cgroupfs --rm --entrypoint bash docker.io/vespaengine/vespa /opt/vespa/bin/vespa-start-configserver
#podman run --events-backend=file --cgroup-manager=cgroupfs --storage-driver vfs --net=host --runtime crun --rm --entrypoint bash docker.io/vespaengine/vespa echo hello
./podman-setup.sh
buildah bud \
--cgroup-manager=cgroupfs \
--storage-driver vfs \
--root /tmp
--file Dockerfile \
--jobs 2 \
--layers=false \
--manifest "vtest:latest" \
--platform linux/amd64,linux/arm64
.