Skip to content

Commit b278fe7

Browse files
BUILD-2271 Migrate to CirrusCI on AWS
1 parent 1e3eef2 commit b278fe7

File tree

3 files changed

+24
-25
lines changed

3 files changed

+24
-25
lines changed

.cirrus.star

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
load("github.com/SonarSource/cirrus-modules@v2", "load_features")
22

33
def main(ctx):
4-
return load_features(
5-
ctx,
6-
features=["vault"]
7-
)
4+
return load_features(ctx)

.cirrus.yaml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
gcp_credentials: ENCRYPTED[!e5f7207bd8d02d383733bef47e18296ac32e3b7d22eb480354e8dd8fdc0004be45a8a4e72c797bd66ee94eb3340fa363!]
2-
3-
41
only_on_none_release_draft_template: &ONLY_ON_NONE_RELEASE_DRAFT_TEMPLATE
52
only_if: $CIRRUS_PRERELEASE != "true"
63

7-
docker_build_container_template: &GKE_CONTAINER_TEMPLATE
4+
docker_build_container_template: &CONTAINER_TEMPLATE
85
dockerfile: .cirrus/Dockerfile
9-
builder_image_project: sonarqube-team
10-
builder_image_name: docker-builder-v20200915
11-
cluster_name: cirrus-ci-cluster
12-
zone: us-central1-a
6+
docker_arguments:
7+
CIRRUS_AWS_ACCOUNT: ${CIRRUS_AWS_ACCOUNT}
8+
cluster_name: ${CIRRUS_CLUSTER_NAME}
9+
builder_role: cirrus-builder
10+
builder_image: docker-builder-v*
11+
builder_instance_type: t2.small
12+
builder_subnet_id: ${CIRRUS_AWS_SUBNET}
13+
region: eu-central-1
1314
namespace: default
1415
cpu: 1
1516
memory: 1Gb
1617

17-
container_template: &GKE_STD_CONTAINER_TEMPLATE
18-
image: us.gcr.io/sonarqube-team/base:j11-latest
19-
cluster_name: cirrus-ci-cluster
20-
zone: us-central1-a
18+
container_template: &STD_CONTAINER_TEMPLATE
19+
image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j11-latest
20+
cluster_name: ${CIRRUS_CLUSTER_NAME}
21+
region: eu-central-1
2122
namespace: default
2223
cpu: 1
2324
memory: 1Gb
@@ -36,8 +37,8 @@ clone_script_template: &CLONE_SCRIPT_TEMPLATE
3637
chart_testing_task:
3738
only_if: $CIRRUS_PRERELEASE != "true" && $CIRRUS_BRANCH != "master"
3839
timeout_in: 30m
39-
gke_container:
40-
<<: *GKE_CONTAINER_TEMPLATE
40+
eks_container:
41+
<<: *CONTAINER_TEMPLATE
4142
cpu: 2
4243
memory: 4Gb
4344
additional_containers:
@@ -65,8 +66,8 @@ chart_testing_task:
6566
chart_packaging_task:
6667
<<: *ONLY_ON_NONE_RELEASE_DRAFT_TEMPLATE
6768
timeout_in: 15m
68-
gke_container:
69-
<<: *GKE_CONTAINER_TEMPLATE
69+
eks_container:
70+
<<: *CONTAINER_TEMPLATE
7071
cpu: 2
7172
memory: 1Gb
7273
<<: *CLONE_SCRIPT_TEMPLATE
@@ -95,8 +96,8 @@ chart_packaging_task:
9596
push_to_repox_task:
9697
<<: *ONLY_ON_NONE_RELEASE_DRAFT_TEMPLATE
9798
timeout_in: 15m
98-
gke_container:
99-
<<: *GKE_STD_CONTAINER_TEMPLATE
99+
eks_container:
100+
<<: *STD_CONTAINER_TEMPLATE
100101
cpu: 1
101102
memory: 1Gb
102103
<<: *CLONE_SCRIPT_TEMPLATE
@@ -115,8 +116,8 @@ push_to_repox_task:
115116

116117
trigger_release_task:
117118
timeout_in: 15m
118-
gke_container:
119-
<<: *GKE_STD_CONTAINER_TEMPLATE
119+
eks_container:
120+
<<: *STD_CONTAINER_TEMPLATE
120121
cpu: 1
121122
memory: 1Gb
122123
only_if: $CIRRUS_PRERELEASE != "true" && $CIRRUS_RELEASE != ""

.cirrus/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM us.gcr.io/sonarqube-team/base:j11-latest as tools
1+
ARG CIRRUS_AWS_ACCOUNT
2+
FROM ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j11-latest as tools
23

34
FROM docker:20.10
45

0 commit comments

Comments
 (0)