-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
73 lines (62 loc) · 2.6 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
stages:
- container-build
- multiarch-push
variables:
IMAGE_REGISTRY_FRONT: "quay.io/arslankhanali/skupper-frontend"
FRONT: "frontend"
IMAGE_REGISTRY_BACK: "quay.io/arslankhanali/skupper-backend"
BACK: "backend"
TAG: "gitlab"
x86-build:
stage: container-build
tags:
- openshift
- x86
image:
name: quay.io/dpkshetty/podman:gitlab_multi
script:
- echo "Building container on x86"
- podman --storage-driver=vfs build --isolation chroot -t $BACK -f skupper-app/backend/Containerfile --no-cache
- podman --storage-driver=vfs build --isolation chroot -t $FRONT -f skupper-app/frontend/Containerfile --no-cache
- echo "Build complete."
- echo "Listing podman images"
- podman --storage-driver=vfs images
- echo "Push image to ${IMAGE_REGISTRY}:${TAG}"
- podman --storage-driver=vfs push --creds $quay_user:$quay_passwd $BACK $IMAGE_REGISTRY_BACK:$TAG-x86
- podman --storage-driver=vfs push --creds $quay_user:$quay_passwd $FRONT $IMAGE_REGISTRY_FRONT:$TAG-x86
ppc64le-build:
stage: container-build
tags:
- openshift
- ppc64le
image:
name: quay.io/dpkshetty/podman:gitlab_multi
script:
- echo "Building container on ppc64le"
- podman --storage-driver=vfs build --isolation chroot -t $BACK -f skupper-app/backend/Containerfile --no-cache
- podman --storage-driver=vfs build --isolation chroot -t $FRONT -f skupper-app/frontend/Containerfile --no-cache
- echo "Build complete."
- echo "Listing podman images"
- podman --storage-driver=vfs images
- echo "Push image to ${IMAGE_REGISTRY}:${TAG}"
- podman --storage-driver=vfs push --creds $quay_user:$quay_passwd $BACK $IMAGE_REGISTRY_BACK:$TAG-ppc64le
- podman --storage-driver=vfs push --creds $quay_user:$quay_passwd $FRONT $IMAGE_REGISTRY_FRONT:$TAG-ppc64le
multiarch-manifest:
stage: multiarch-push
tags:
- openshift
image:
name: quay.io/dpkshetty/podman:gitlab_multi
needs:
- x86-build
- ppc64le-build
script:
- echo "Creating multiarch manifest ${IMAGE_REGISTRY}:${TAG}-multiarch"
- podman manifest create mylist-front
- podman manifest add mylist-front $IMAGE_REGISTRY_FRONT:$TAG-ppc64le
- podman manifest add mylist-front $IMAGE_REGISTRY_FRONT:$TAG-x86
- podman manifest push --creds $quay_user:$quay_passwd mylist-front $IMAGE_REGISTRY_FRONT:$TAG
- podman manifest create mylist-back
- podman manifest add mylist-back $IMAGE_REGISTRY_BACK:$TAG-ppc64le
- podman manifest add mylist-back $IMAGE_REGISTRY_BACK:$TAG-x86
- podman manifest push --creds $quay_user:$quay_passwd mylist-back $IMAGE_REGISTRY_BACK:$TAG