-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.gitlab-ci.yml
109 lines (98 loc) · 2.34 KB
/
.gitlab-ci.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
include:
- https://gitlab.com/Linaro/tuxpkg/-/raw/main/gitlab-ci-pipeline.yml
variables:
TUXPKG: python3 -m tuxpkg
TUXPKG_PROJECT: lava-test-plans
SKIP_TEST_LAVA_VALIDITY: 1
NUM_WORKERS: ''
TUXPKG_MIN_COVERAGE: 52
services:
- docker:dind
.docker:
image: docker
before_script:
- docker info
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- export tag="lavasoftware/lava-test-plans:${CI_COMMIT_TAG}${TAG_APPEND}"
- export latest="lavasoftware/lava-test-plans:latest${TAG_APPEND}"
script:
- docker build --build-arg version="${CI_COMMIT_TAG}" --pull --tag "${tag}" --tag "${latest}" .
- docker push "${tag}"
- docker push "${latest}"
variables:
DOCKER_DRIVER: overlay2
docker-amd64:
extends: .docker
stage: build
variables:
TAG_APPEND: -amd64
only:
- tags
docker-arm64:
extends: .docker
stage: build
tags:
- arm64-dind
variables:
TAG_APPEND: -arm64
only:
- tags
.docker-master:
extends: .docker
stage: build
variables:
IMAGE_NAME: "lavasoftware/lava-test-plans:master"
script:
- docker build --build-arg version="${CI_COMMIT_SHORT_SHA}" --pull --tag "${IMAGE_NAME}${TAG_APPEND}" .
- docker push "${IMAGE_NAME}${TAG_APPEND}"
only:
- master
docker-master-amd64:
extends: .docker-master
stage: build
variables:
TAG_APPEND: -amd64
docker-master-arm64:
extends: .docker-master
stage: build
tags:
- arm64-dind
variables:
TAG_APPEND: -arm64
publish-dockerhub:
extends: .docker
stage: deploy
variables:
DOCKER_CLI_EXPERIMENTAL: "enabled"
script:
- docker manifest create "${tag}" "${tag}-amd64" "${tag}-arm64"
- docker manifest create "${latest}" "${latest}-amd64" "${latest}-arm64"
- docker manifest push "${tag}"
- docker manifest push "${latest}"
only:
- tags
publish-master-dockerhub:
extends: .docker
stage: deploy
variables:
DOCKER_CLI_EXPERIMENTAL: "enabled"
IMAGE_NAME: "lavasoftware/lava-test-plans:master"
script:
- docker manifest create "${IMAGE_NAME}" "${IMAGE_NAME}-amd64" "${IMAGE_NAME}-arm64"
- docker manifest push "${IMAGE_NAME}"
only:
- master
pages:
stage: deploy
needs:
- test
- repository
only:
- tags
script:
- mkdir public
- echo SOON > public/index.html
- cp -r dist/repo public/packages
artifacts:
paths:
- public