-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.gitlab-ci.yml
91 lines (81 loc) · 2.82 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
image: public.ecr.aws/r3m4q3r9/qovery-ci:base-2024-07-17T13-38-39
services:
- docker:dind
variables:
FF_GITLAB_REGISTRY_HELPER_IMAGE: 1
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
DOCKER_BUILDKIT: 1
DOCKER_TLS_CERTDIR: ""
stages:
- release
- deploy
release-new-image:
stage: release
script:
- sleep 10m # sleep 10 minutes since chart release isn't instant on tags push
only:
- tags
tags:
- vm-250mcpu-1gmem-0g
build-new-image:
stage: release
before_script:
- ci_helper init_buildkit_builder "${CI_JOB_NAME}" 2 4
- ci_helper docker_login_public_prod_ecr
after_script:
- ci_helper teardown_buildkit_builder "${CI_JOB_NAME}"
script:
- eval $(ci_helper print_aws_ctx 'CI_BUILDER')
- docker buildx build --platform=linux/amd64,linux/arm64 -t public.ecr.aws/r3m4q3r9/pleco:$(echo ${CI_COMMIT_TAG} | sed 's/v//') --push .
only:
- tags
tags:
- vm-250mcpu-1gmem-0g
ec2-test-cluster:
stage: deploy
script:
- helm --kubeconfig $KUBECONFIG_EC2_TEST_CLUSTER upgrade --install --wait -n kube-system -f $PLECO_VALUES_EC2 --create-namespace pleco-ec2 charts/pleco
only:
- tags
- schedules
tags:
- vm-250mcpu-1gmem-0g
scaleway-test-cluster:
stage: deploy
script:
- helm --kubeconfig $KUBECONFIG_SCW_TEST_CLUSTER upgrade --install --wait -n kube-system -f $PLECO_VALUES_SCALEWAY --create-namespace pleco-scaleway charts/pleco
only:
- tags
- schedules
tags:
- vm-250mcpu-1gmem-0g
gcp-test-cluster:
stage: deploy
script:
- gcloud auth activate-service-account $(cat $GKE_GCP_CREDENTIALS_JSON | jq -r .client_email) --key-file=$GKE_GCP_CREDENTIALS_JSON
- gcloud container clusters get-credentials $GKE_GCP_TEST_CLUSTER_NAME --region=$GKE_GCP_DEFAULT_REGION --project=$(cat $GKE_GCP_CREDENTIALS_JSON | jq -r .project_id)
- helm --kubeconfig $KUBECONFIG_GCP_TEST_CLUSTER upgrade --install --wait -n qovery -f $PLECO_VALUES_GCP --create-namespace pleco-gcp charts/pleco
only:
- tags
- schedules
tags:
- vm-250mcpu-1gmem-0g
eks-test-cluster:
stage: deploy
script:
- AWS_ACCESS_KEY_ID=$EKS_AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$EKS_AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION=$EKS_AWS_DEFAULT_REGION helm --kubeconfig $KUBECONFIG_EKS_TEST_CLUSTER upgrade --install --wait -n kube-system -f $PLECO_VALUES_EKS --create-namespace pleco-eks charts/pleco
only:
- tags
- schedules
tags:
- vm-250mcpu-1gmem-0g
aws-sandbox:
stage: deploy
script:
- AWS_ACCESS_KEY_ID=$EKS_AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$EKS_AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION=$EKS_AWS_DEFAULT_REGION helm --kubeconfig $KUBECONFIG_EKS_TEST_CLUSTER upgrade --install --wait -n kube-system -f $PLECO_VALUES_SANDBOX --create-namespace pleco-sandbox charts/pleco
only:
- tags
- schedules
tags:
- vm-250mcpu-1gmem-0g