forked from pachyderm/pachyderm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.testfaster.yml
137 lines (125 loc) · 5.36 KB
/
.testfaster.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
name: Pachyderm
base:
# NB: use:
# testctl ssh --tty=false -- docker images --format "{{.Repository}}:{{.Tag}}" |sort |sed 's/^/ - /g'
# to refresh this list
# (to get extra fancy, highlight the following lines in vim and type :! and then
# the above command to replace it inline)
preload_docker_images:
- bash:4
- debian:buster-slim
- dockermuenster/caddy:0.9.3
- gcr.io/google_containers/kube-state-metrics:v0.5.0
- gcr.io/k8s-minikube/storage-provisioner:v1.8.1
- giantswarm/tiny-tools:latest
- golang:1.14.2
- golang:1.16.4
- grafana/grafana:4.2.0
- grafana/loki:2.0.0
- grafana/promtail:2.0.0
- k8s.gcr.io/coredns:1.6.7
- k8s.gcr.io/etcd:3.4.3-0
- k8s.gcr.io/kube-apiserver:v1.18.3
- k8s.gcr.io/kube-controller-manager:v1.18.3
- k8s.gcr.io/kube-proxy:v1.18.3
- k8s.gcr.io/kube-scheduler:v1.18.3
- k8s.gcr.io/pause:3.2
- pachyderm/dash:0.5.57
- pachyderm/etcd:v3.3.5
- pachyderm/grpc-proxy:0.4.10
- pachyderm/opencv:latest
- pachyderm/ubuntuplusnetcat:latest
- postgres:13.0-alpine
- prom/node-exporter:v0.14.0
- prom/prometheus:v1.7.0
- python:latest
- quay.io/prometheus/alertmanager:v0.7.1
- ubuntu:20.04
- v4tech/imagemagick:latest
# TODO: make this optional
kernel_image: "quay.io/testfaster/ignite-kernel"
os_dockerfile: |-
FROM quay.io/testfaster/kube-ubuntu
ENV cache-bust 19
RUN apt-get update && apt-get install -y build-essential gettext-base socat shellcheck rsync jq pv silversearcher-ag
RUN cd /root && wget -nv -O - https://dl.google.com/go/go1.15.4.linux-amd64.tar.gz | tar -zxf -
ENV GOPATH=/root/go
ENV PATH=/root/go/bin:${PATH}
RUN echo "AcceptEnv ENT_ACT_CODE BUCKET PPS_BUCKETS AUTH_BUCKETS GOPROXY CIRCLE_BRANCH RUN_BAD_TESTS DOCKER_PWD AMAZON_CLIENT_ID AMAZON_CLIENT_SECRET AMAZON_CLIENT_BUCKET AMAZON_CLIENT_REGION ECS_CLIENT_ID ECS_CLIENT_SECRET ECS_CLIENT_BUCKET ECS_CLIENT_CUSTOM_ENDPOINT GOOGLE_CLIENT_BUCKET GOOGLE_CLIENT_CREDS GOOGLE_CLIENT_HMAC_ID GOOGLE_CLIENT_HMAC_SECRET GOOGLE_CLIENT_REGION MICROSOFT_CLIENT_ID MICROSOFT_CLIENT_SECRET MICROSOFT_CLIENT_CONTAINER GOOGLE_TEST_UPLOAD_CREDS BIGQUERY_PROJECT BIGQUERY_DATASET BIGQUERY_TABLE TEST_RESULTS_BUCKET CIRCLE_REPOSITORY_URL CIRCLE_STAGE CIRCLE_BUILD_NUM CIRCLE_SHA1" >> /etc/ssh/sshd_config
RUN mkdir /root/project
WORKDIR /root/project
# Warm up go mod cache and go build cache we set CIRCLE_BRANCH so that
# Makefile uses cacheable build params (version).
RUN git clone https://github.com/pachyderm/pachyderm && \
cd pachyderm && \
git checkout 3b4a8a7c8e2f8e3b6ca179c4816c29e943b71731 && \
CIRCLE_BRANCH=1 make install
# Also cache the go deps the linter uses (we don't really care if the
# linter passes)
RUN cd pachyderm && \
PATH="/root/go/bin:${PATH}" etc/testing/lint.sh || true
RUN wget -nv https://github.com/instrumenta/kubeval/releases/download/0.15.0/kubeval-linux-amd64.tar.gz && \
tar xf kubeval-linux-amd64.tar.gz && \
cp kubeval /usr/local/bin && \
rm kubeval-linux-amd64.tar.gz
RUN cd /usr/local/ && \
wget -nv -O - https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh
docker_bake_script: |-
#!/bin/bash
set -xeuo pipefail
cd /root/project/pachyderm
# we set CIRCLE_BRANCH so that Makefile uses cacheable
# build params (version)
export CIRCLE_BRANCH=1
export GOPATH=/root/go
export PATH=/root/go/bin:${PATH}
# warm up docker buildkit go mod cache and go build cache
git config user.email "donotreply@pachyderm.com"
git config user.name "anonymous"
git tag -f -am "Circl CI test bake script" v0.0.1-circle-test-base-image
# VERSION is used by docker-build-pipeline-build (Env.VERSION in
# goreleaser/docker-build-pipelines.yml), needs to be something like
# '1.12.0-CIbuild'
export VERSION="$(pachctl version --client-only)"
echo "Using VERSION=$VERSION"
make docker-build
# build docker images that are used in tests
(cd etc/testing/images/ubuntu_with_s3_clients; make image)
make docker-build-kafka
make docker-build-spout-test
make docker-build-test-entrypoint
make docker-build-proto
set +x
echo "============= POST BAKE IMAGES =================="
docker images
echo "================================================="
prewarm_script: |-
#!/bin/bash
set -euo pipefail
cd /root/project/pachyderm
# re-warm OS file cache etc, e.g. load the file metadata into VM memory to
# make the actual build faster (it's already been cached on disk from the
# previous stages)
export CIRCLE_BRANCH=1
export GOPATH=/root/go
export PATH=/root/go/bin:${PATH}
make install
git config user.email "donotreply@pachyderm.com"
git config user.name "anonymous"
git tag -f -am "Circl CI test prewarm script" v0.0.1-circle-test-base-image
make docker-build
# start services used by tests
make launch-loki
# leave a clue that the VM is ready..
touch /TESTFASTER_PREWARM_COMPLETE
kubernetes_version: 'v1.18.3'
runtime:
cpus: 4
memory: 16GB
disk: 50GB
prewarm_pool_size: 10
max_pool_size: 20
# timeout vms after 6 hours. hopefully tests will clean them up sooner, but if
# the tests themselves timeout and cleanup doesn't get run, we don't want old
# VMs building up and stopping new ones getting scheduled.
default_lease_timeout: 6h