Skip to content

Commit 540ed96

Browse files
authored
Merge branch 'main' into release/2022.06.1
2 parents 267953e + 65326d5 commit 540ed96

File tree

571 files changed

+26412
-8221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

571 files changed

+26412
-8221
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
/install/installer/pkg/components/server @gitpod-io/engineering-webapp
4242
/install/installer/pkg/components/server/ide @gitpod-io/engineering-ide
4343
/install/installer/pkg/components/usage @gitpod-io/engineering-webapp
44+
/install/installer/pkg/components/usage-api @gitpod-io/engineering-webapp
4445
/install/installer/pkg/components/workspace @gitpod-io/engineering-workspace
4546
/install/installer/pkg/components/workspace/ide @gitpod-io/engineering-ide
4647
/install/installer/pkg/components/ws-daemon @gitpod-io/engineering-workspace

.github/workflows/configcat.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on: [push]
2+
name: Configcat code references
3+
jobs:
4+
scan-repo:
5+
runs-on: ubuntu-latest
6+
name: Scan repository for configcat code references
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v2
10+
- name: Scan & upload
11+
uses: configcat/scan-repository@v1
12+
with:
13+
api-user: ${{ secrets.CONFIGCAT_API_USER }}
14+
api-pass: ${{ secrets.CONFIGCAT_API_PASS }}
15+
config-id: 08da1258-6541-4fc7-8b61-c8b47f82f3a0

.gitpod.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:ljb-werft-cli-grpc-changes.2
1+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go184.0
22
workspaceLocation: gitpod/gitpod-ws.code-workspace
33
checkoutLocation: gitpod
44
ports:
@@ -30,11 +30,14 @@ ports:
3030
onOpen: ignore
3131
# Dev Theia
3232
- port: 13444
33+
# Used when using port-forwarding to SSH to preview environment VMs
34+
- port: 8022
35+
onOpen: ignore
3336
tasks:
3437
- name: Install Preview Environment kube-context
3538
command: |
3639
(cd dev/preview/previewctl && go install .)
37-
previewctl install-context
40+
previewctl install-context --watch
3841
exit
3942
- name: Add Harvester kubeconfig
4043
command: |

.prettierrc.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,13 @@
22
"printWidth": 120,
33
"tabWidth": 4,
44
"endOfLine": "auto",
5-
"trailingComma": "all"
5+
"trailingComma": "all",
6+
"overrides": [
7+
{
8+
"files": [".werft/**/*.yaml"],
9+
"options": {
10+
"tabWidth": 2
11+
}
12+
}
13+
]
614
}

.werft/.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vm/charts/**
2+
vm/manifests/**

.werft/aks-installer-tests.yaml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# debug using `werft run github -f -s .werft/installer-tests.ts -j .werft/aks-installer-tests.yaml -a debug=true`
2+
pod:
3+
serviceAccount: werft
4+
affinity:
5+
nodeAffinity:
6+
requiredDuringSchedulingIgnoredDuringExecution:
7+
nodeSelectorTerms:
8+
- matchExpressions:
9+
- key: dev/workload
10+
operator: In
11+
values:
12+
- "builds"
13+
securityContext:
14+
runAsUser: 0
15+
volumes:
16+
- name: sh-playground-sa-perm
17+
secret:
18+
secretName: sh-playground-sa-perm
19+
- name: sh-playground-dns-perm
20+
secret:
21+
secretName: sh-playground-dns-perm
22+
containers:
23+
- name: nightly-test
24+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go184.0
25+
workingDir: /workspace
26+
imagePullPolicy: Always
27+
volumeMounts:
28+
- name: sh-playground-sa-perm
29+
mountPath: /mnt/secrets/sh-playground-sa-perm
30+
- name: sh-playground-dns-perm # this sa is used for the DNS management
31+
mountPath: /mnt/secrets/sh-playground-dns-perm
32+
env:
33+
- name: ARM_SUBSCRIPTION_ID
34+
valueFrom:
35+
secretKeyRef:
36+
name: aks-credentials
37+
key: subscriptionid
38+
- name: ARM_TENANT_ID
39+
valueFrom:
40+
secretKeyRef:
41+
name: aks-credentials
42+
key: tenantid
43+
- name: ARM_CLIENT_ID
44+
valueFrom:
45+
secretKeyRef:
46+
name: aks-credentials
47+
key: clientid
48+
- name: ARM_CLIENT_SECRET
49+
valueFrom:
50+
secretKeyRef:
51+
name: aks-credentials
52+
key: clientsecret
53+
- name: GOOGLE_APPLICATION_CREDENTIALS
54+
value: "/mnt/secrets/sh-playground-sa-perm/sh-sa.json"
55+
- name: TF_VAR_dns_sa_creds
56+
value: "/mnt/secrets/sh-playground-dns-perm/sh-dns-sa.json"
57+
- name: NODENAME
58+
valueFrom:
59+
fieldRef:
60+
fieldPath: spec.nodeName
61+
command:
62+
- bash
63+
- -c
64+
- |
65+
sleep 1
66+
set -Eeuo pipefail
67+
68+
sudo chown -R gitpod:gitpod /workspace
69+
sudo apt update && apt install gettext-base
70+
71+
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
72+
73+
export TF_VAR_TEST_ID=$(echo $RANDOM | md5sum | head -c 5; echo)
74+
75+
(cd .werft && yarn install && mv node_modules ..) | werft log slice prep
76+
printf '{{ toJson . }}' > context.json
77+
78+
npx ts-node .werft/installer-tests.ts "STANDARD_AKS_TEST"
79+
80+
# The bit below makes this a cron job
81+
plugins:
82+
cron: "15 3 * * *"

.werft/build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async function run(context: any) {
6363
if (!config.withPreview || config.publishRelease) {
6464
werft.phase("deploy", "not deploying");
6565
console.log("running without preview environment or publish-release is set");
66-
return
66+
return;
6767
}
6868

6969
try {

.werft/build.yaml

+12-9
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ pod:
2323
- name: gcp-sa-release
2424
secret:
2525
secretName: gcp-sa-gitpod-release-deployer
26-
- name: gpsh-coredev-license
27-
secret:
28-
secretName: gpsh-coredev-license
2926
- name: prometheus-remote-write-auth
3027
secret:
3128
secretName: prometheus-remote-write-auth
@@ -54,6 +51,10 @@ pod:
5451
- name: fluent-bit-external
5552
secret:
5653
secretName: fluent-bit-external
54+
- name: github-token-gitpod-bot
55+
secret:
56+
defaultMode: 420
57+
secretName: github-token-gitpod-bot
5758
# - name: deploy-key
5859
# secret:
5960
# secretName: deploy-key
@@ -74,7 +75,7 @@ pod:
7475
- name: MYSQL_TCP_PORT
7576
value: 23306
7677
- name: build
77-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:ljb-werft-cli-grpc-changes.2
78+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go184.0
7879
workingDir: /workspace
7980
imagePullPolicy: IfNotPresent
8081
resources:
@@ -95,9 +96,6 @@ pod:
9596
- name: gcp-sa-release
9697
mountPath: /mnt/secrets/gcp-sa-release
9798
readOnly: true
98-
- name: gpsh-coredev-license
99-
mountPath: /mnt/secrets/gpsh-coredev
100-
readOnly: true
10199
- name: gpsh-harvester-license
102100
mountPath: /mnt/secrets/gpsh-harvester
103101
readOnly: true
@@ -118,6 +116,8 @@ pod:
118116
mountPath: /mnt/secrets/harvester-k3s-dockerhub-pull-account
119117
- name: fluent-bit-external
120118
mountPath: /mnt/fluent-bit-external
119+
- mountPath: /mnt/secrets/github-token-gitpod-bot
120+
name: github-token-gitpod-bot
121121
# - name: deploy-key
122122
# mountPath: /mnt/secrets/deploy-key
123123
# readOnly: true
@@ -137,8 +137,6 @@ pod:
137137
value: http://athens-athens-proxy.athens.svc.cluster.local:9999
138138
- name: GOCACHE
139139
value: /go-build-cache
140-
- name: WERFT_HOST
141-
value: "werft.werft.svc.cluster.local:7777"
142140
- name: NODENAME
143141
valueFrom:
144142
fieldRef:
@@ -218,6 +216,11 @@ pod:
218216
secretKeyRef:
219217
name: replicated
220218
key: token
219+
# Used by the Werft CLI through werft-credential-helper.sh
220+
- name: WERFT_GITHUB_TOKEN_PATH
221+
value: "/mnt/secrets/github-token-gitpod-bot/token"
222+
- name: WERFT_CREDENTIAL_HELPER
223+
value: "/workspace/dev/preview/werft-credential-helper.sh"
221224
command:
222225
- bash
223226
- -c

.werft/config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
rules:
2-
- path: ".werft/build.yaml"
3-
matchesAll:
4-
- or: ["repo.ref ~= refs/heads/"]
5-
- or: ["trigger !== deleted"]
2+
- path: ".werft/build.yaml"
3+
matchesAll:
4+
- or: ["repo.ref ~= refs/heads/"]
5+
- or: ["trigger !== deleted"]

.werft/debug.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pod:
5353
- name: MYSQL_TCP_PORT
5454
value: 23306
5555
- name: build
56-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:ljb-werft-cli-grpc-changes.2
56+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go184.0
5757
workingDir: /workspace
5858
imagePullPolicy: IfNotPresent
5959
volumeMounts:
@@ -96,8 +96,6 @@ pod:
9696
value: http://athens-athens-proxy.athens.svc.cluster.local:9999
9797
- name: GOCACHE
9898
value: /go-build-cache
99-
- name: WERFT_HOST
100-
value: "werft.werft.svc.cluster.local:7777"
10199
- name: NODENAME
102100
valueFrom:
103101
fieldRef:

.werft/eks-installer-tests.yaml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# debug using `werft run github -f -s .werft/installer-tests.ts -j .werft/eks-installer-tests.yaml -a debug=true`
2+
pod:
3+
serviceAccount: werft
4+
affinity:
5+
nodeAffinity:
6+
requiredDuringSchedulingIgnoredDuringExecution:
7+
nodeSelectorTerms:
8+
- matchExpressions:
9+
- key: dev/workload
10+
operator: In
11+
values:
12+
- "builds"
13+
securityContext:
14+
runAsUser: 0
15+
volumes:
16+
- name: sh-playground-sa-perm
17+
secret:
18+
secretName: sh-playground-sa-perm
19+
- name: sh-playground-dns-perm
20+
secret:
21+
secretName: sh-playground-dns-perm
22+
containers:
23+
- name: nightly-test
24+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go184.0
25+
workingDir: /workspace
26+
imagePullPolicy: Always
27+
volumeMounts:
28+
- name: sh-playground-sa-perm # this is used for tf backend bucket
29+
mountPath: /mnt/secrets/sh-playground-sa-perm
30+
- name: sh-playground-dns-perm # this sa is used for the DNS management
31+
mountPath: /mnt/secrets/sh-playground-dns-perm
32+
env:
33+
- name: AWS_ACCESS_KEY_ID
34+
valueFrom:
35+
secretKeyRef:
36+
name: aws-credentials
37+
key: aws-access-key
38+
- name: AWS_SECRET_ACCESS_KEY
39+
valueFrom:
40+
secretKeyRef:
41+
name: aws-credentials
42+
key: aws-secret-key
43+
- name: AWS_REGION
44+
valueFrom:
45+
secretKeyRef:
46+
name: aws-credentials
47+
key: aws-region
48+
- name: GOOGLE_APPLICATION_CREDENTIALS
49+
value: "/mnt/secrets/sh-playground-sa-perm/sh-sa.json"
50+
- name: TF_VAR_dns_sa_creds
51+
value: "/mnt/secrets/sh-playground-dns-perm/sh-dns-sa.json"
52+
- name: NODENAME
53+
valueFrom:
54+
fieldRef:
55+
fieldPath: spec.nodeName
56+
command:
57+
- bash
58+
- -c
59+
- |
60+
sleep 1
61+
set -Eeuo pipefail
62+
63+
sudo chown -R gitpod:gitpod /workspace
64+
sudo apt update && apt install gettext-base
65+
66+
export TF_VAR_TEST_ID="$(echo $RANDOM | md5sum | head -c 5; echo)"
67+
68+
(cd .werft && yarn install && mv node_modules ..) | werft log slice prep
69+
printf '{{ toJson . }}' > context.json
70+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
71+
unzip awscliv2.zip
72+
sudo ./aws/install
73+
74+
npx ts-node .werft/installer-tests.ts "STANDARD_EKS_TEST"
75+
76+
# The bit below makes this a cron job
77+
plugins:
78+
cron: "15 3 * * *"

0 commit comments

Comments
 (0)