Skip to content

Commit f5ac8d5

Browse files
committed
Fix previewctl SA, rebuild and update docker img
1 parent cb83111 commit f5ac8d5

18 files changed

+22
-27
lines changed

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
1+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
22
workspaceLocation: gitpod/gitpod-ws.code-workspace
33
checkoutLocation: gitpod
44
ports:

.werft/aks-installer-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pod:
6565
secretName: self-hosted-github-oauth
6666
containers:
6767
- name: nightly-test
68-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
68+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
6969
workingDir: /workspace
7070
imagePullPolicy: Always
7171
volumeMounts:

.werft/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pod:
7676
- name: MYSQL_TCP_PORT
7777
value: 23306
7878
- name: build
79-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
79+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
8080
workingDir: /workspace
8181
imagePullPolicy: IfNotPresent
8282
resources:

.werft/cleanup-installer-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pod:
2525
secretName: aks-credentials
2626
containers:
2727
- name: nightly-test
28-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
28+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
2929
workingDir: /workspace
3030
imagePullPolicy: Always
3131
volumeMounts:

.werft/debug.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pod:
5454
- name: MYSQL_TCP_PORT
5555
value: 23306
5656
- name: build
57-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
57+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
5858
workingDir: /workspace
5959
imagePullPolicy: IfNotPresent
6060
volumeMounts:

.werft/eks-installer-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pod:
6565
secretName: self-hosted-github-oauth
6666
containers:
6767
- name: nightly-test
68-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
68+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
6969
workingDir: /workspace
7070
imagePullPolicy: Always
7171
volumeMounts:

.werft/gke-installer-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pod:
6565
secretName: self-hosted-github-oauth
6666
containers:
6767
- name: nightly-test
68-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
68+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
6969
workingDir: /workspace
7070
imagePullPolicy: Always
7171
volumeMounts:

.werft/ide-integration-tests-startup.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pod:
1717
secretName: github-token-gitpod-bot
1818
containers:
1919
- name: gcloud
20-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
20+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
2121
workingDir: /workspace
2222
imagePullPolicy: IfNotPresent
2323
env:

.werft/k3s-installer-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pod:
6565
secretName: self-hosted-github-oauth
6666
containers:
6767
- name: nightly-test
68-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
68+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
6969
workingDir: /workspace
7070
imagePullPolicy: Always
7171
volumeMounts:

.werft/platform-delete-preview-environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pod:
2525
secretName: harvester-vm-ssh-keys
2626
containers:
2727
- name: build
28-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
28+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
2929
workingDir: /workspace
3030
imagePullPolicy: IfNotPresent
3131
volumeMounts:

.werft/platform-delete-preview-environments-cron.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pod:
2929
secretName: github-token-gitpod-bot
3030
containers:
3131
- name: build
32-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
32+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
3333
workingDir: /workspace
3434
imagePullPolicy: IfNotPresent
3535
volumeMounts:

.werft/platform-trigger-artificial-job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pod:
2424
secretName: github-token-gitpod-bot
2525
containers:
2626
- name: build
27-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-dl.1
27+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
2828
workingDir: /workspace
2929
imagePullPolicy: IfNotPresent
3030
volumeMounts:

.werft/platform-trigger-werft-cleanup.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pod:
2222
secretName: gcp-sa-gitpod-dev-deployer
2323
containers:
2424
- name: build
25-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
25+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
2626
workingDir: /workspace
2727
imagePullPolicy: IfNotPresent
2828
volumeMounts:

.werft/workspace-run-integration-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pod:
2222
secretName: github-token-gitpod-bot
2323
containers:
2424
- name: gcloud
25-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-dev-update-image.8
25+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2aa-previewctl-fix-rebuild.2
2626
workingDir: /workspace
2727
imagePullPolicy: IfNotPresent
2828
env:

components/supervisor/pkg/config/gitpod-config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestGitpodConfig(t *testing.T) {
2929
{
3030
Desc: "parsing",
3131
Content: `
32-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:clu-yq4.1
32+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2clu-yq4.1
3333
workspaceLocation: gitpod/gitpod-ws.code-workspace
3434
checkoutLocation: gitpod
3535
ports:
@@ -48,7 +48,7 @@ vscode:
4848
- [email protected]:UATTe2sTFfCYWQ3jw4IRsw==
4949
- [email protected]:ZnPmyF/Pb8AIWeCqc83gPw==`,
5050
Expectation: &gitpod.GitpodConfig{
51-
Image: "eu.gcr.io/gitpod-core-dev/dev/dev-environment:clu-yq4.1",
51+
Image: "eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2clu-yq4.1",
5252
WorkspaceLocation: "gitpod/gitpod-ws.code-workspace",
5353
CheckoutLocation: "gitpod",
5454
Ports: []*gitpod.PortsItems{

components/usage/pkg/db/dbtest/workspace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616

1717
const (
1818
WorkspaceContext = `{"title":"[usage] List workspaces for each workspace instance in usage period","repository":{"cloneUrl":"https://github.com/gitpod-io/gitpod.git","host":"github.com","name":"gitpod","owner":"gitpod-io","private":false},"ref":"mp/usage-list-workspaces","refType":"branch","revision":"586f22ecaeeb3b4796fd92f9ae1ca3512ca1e330","nr":10495,"base":{"repository":{"cloneUrl":"https://github.com/gitpod-io/gitpod.git","host":"github.com","name":"gitpod","owner":"gitpod-io","private":false},"ref":"mp/usage-validate-instances","refType":"branch"},"normalizedContextURL":"https://github.com/gitpod-io/gitpod/pull/10495","checkoutLocation":"gitpod"}`
19-
WorkspaceConfig = `{"image":"eu.gcr.io/gitpod-core-dev/dev/dev-environment:me-me-image.1","workspaceLocation":"gitpod/gitpod-ws.code-workspace","checkoutLocation":"gitpod","ports":[{"port":1337,"onOpen":"open-preview"},{"port":3000,"onOpen":"ignore"},{"port":3001,"onOpen":"ignore"},{"port":3306,"onOpen":"ignore"},{"port":4000,"onOpen":"ignore"},{"port":5900,"onOpen":"ignore"},{"port":6080,"onOpen":"ignore"},{"port":7777,"onOpen":"ignore"},{"port":9229,"onOpen":"ignore"},{"port":9999,"onOpen":"ignore"},{"port":13001,"onOpen":"ignore"},{"port":13444}],"tasks":[{"name":"Install Preview Environment kube-context","command":"(cd dev/preview/previewctl && go install .)\npreviewctl install-context\nexit\n"},{"name":"Add Harvester kubeconfig","command":"./dev/preview/util/download-and-merge-harvester-kubeconfig.sh\nexit 0\n"},{"name":"Java","command":"if [ -z \"$RUN_GRADLE_TASK\" ]; then\n read -r -p \"Press enter to continue Java gradle task\"\nfi\nleeway exec --package components/supervisor-api/java:lib --package components/gitpod-protocol/java:lib -- ./gradlew --build-cache build\nleeway exec --package components/ide/jetbrains/backend-plugin:plugin --package components/ide/jetbrains/gateway-plugin:publish --parallel -- ./gradlew --build-cache buildPlugin\n"},{"name":"TypeScript","before":"scripts/branch-namespace.sh","init":"yarn --network-timeout 100000 && yarn build"},{"name":"Go","before":"pre-commit install --install-hooks","init":"leeway exec --filter-type go -v -- go mod verify","openMode":"split-right"}],"vscode":{"extensions":["bradlc.vscode-tailwindcss","EditorConfig.EditorConfig","golang.go","hashicorp.terraform","ms-azuretools.vscode-docker","ms-kubernetes-tools.vscode-kubernetes-tools","stkb.rewrap","zxh404.vscode-proto3","matthewpi.caddyfile-support","heptio.jsonnet","timonwong.shellcheck","vscjava.vscode-java-pack","fwcd.kotlin","dbaeumer.vscode-eslint","esbenp.prettier-vscode"]},"jetbrains":{"goland":{"prebuilds":{"version":"stable"}}},"_origin":"repo","_featureFlags":[]}`
19+
WorkspaceConfig = `{"image":"eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.2me-me-image.1","workspaceLocation":"gitpod/gitpod-ws.code-workspace","checkoutLocation":"gitpod","ports":[{"port":1337,"onOpen":"open-preview"},{"port":3000,"onOpen":"ignore"},{"port":3001,"onOpen":"ignore"},{"port":3306,"onOpen":"ignore"},{"port":4000,"onOpen":"ignore"},{"port":5900,"onOpen":"ignore"},{"port":6080,"onOpen":"ignore"},{"port":7777,"onOpen":"ignore"},{"port":9229,"onOpen":"ignore"},{"port":9999,"onOpen":"ignore"},{"port":13001,"onOpen":"ignore"},{"port":13444}],"tasks":[{"name":"Install Preview Environment kube-context","command":"(cd dev/preview/previewctl && go install .)\npreviewctl install-context\nexit\n"},{"name":"Add Harvester kubeconfig","command":"./dev/preview/util/download-and-merge-harvester-kubeconfig.sh\nexit 0\n"},{"name":"Java","command":"if [ -z \"$RUN_GRADLE_TASK\" ]; then\n read -r -p \"Press enter to continue Java gradle task\"\nfi\nleeway exec --package components/supervisor-api/java:lib --package components/gitpod-protocol/java:lib -- ./gradlew --build-cache build\nleeway exec --package components/ide/jetbrains/backend-plugin:plugin --package components/ide/jetbrains/gateway-plugin:publish --parallel -- ./gradlew --build-cache buildPlugin\n"},{"name":"TypeScript","before":"scripts/branch-namespace.sh","init":"yarn --network-timeout 100000 && yarn build"},{"name":"Go","before":"pre-commit install --install-hooks","init":"leeway exec --filter-type go -v -- go mod verify","openMode":"split-right"}],"vscode":{"extensions":["bradlc.vscode-tailwindcss","EditorConfig.EditorConfig","golang.go","hashicorp.terraform","ms-azuretools.vscode-docker","ms-kubernetes-tools.vscode-kubernetes-tools","stkb.rewrap","zxh404.vscode-proto3","matthewpi.caddyfile-support","heptio.jsonnet","timonwong.shellcheck","vscjava.vscode-java-pack","fwcd.kotlin","dbaeumer.vscode-eslint","esbenp.prettier-vscode"]},"jetbrains":{"goland":{"prebuilds":{"version":"stable"}}},"_origin":"repo","_featureFlags":[]}`
2020
)
2121

2222
// NewWorkspace creates a new stub workspace with default values, unless these are set on the workspace argument

dev/image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
FROM gitpod/workspace-full:2022-10-15-02-50-27
66

7-
ENV TRIGGER_REBUILD 22
7+
ENV TRIGGER_REBUILD 23
88

99
USER root
1010

dev/preview/previewctl/cmd/credentials.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ type getCredentialsOpts struct {
3434
gcpClient *gcloud.Config
3535
logger *logrus.Logger
3636

37-
serviceAccountPath string
38-
kubeConfigSavePath string
39-
4037
getCredentialsMap map[string]func(ctx context.Context) (*api.Config, error)
4138
configMap map[string]*api.Config
4239
}
@@ -46,18 +43,16 @@ func newGetCredentialsCommand(logger *logrus.Logger) *cobra.Command {
4643
var client *gcloud.Config
4744
ctx := context.Background()
4845
opts := &getCredentialsOpts{
49-
logger: logger,
50-
kubeConfigSavePath: kubeConfigSavePath,
51-
serviceAccountPath: serviceAccountPath,
52-
configMap: map[string]*api.Config{},
46+
logger: logger,
47+
configMap: map[string]*api.Config{},
5348
}
5449

5550
cmd := &cobra.Command{
5651
Use: "get-credentials",
5752
Long: `previewctl get-credentials retrieves the kubernetes configs for core-dev and harvester clusters,
5853
merges them with the default config, and outputs them either to stdout or to a file.`,
5954
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
60-
client, err = gcloud.New(ctx, opts.serviceAccountPath)
55+
client, err = gcloud.New(ctx, serviceAccountPath)
6156
if err != nil {
6257
return err
6358
}
@@ -118,7 +113,7 @@ func (o *getCredentialsOpts) mergeContexts() error {
118113
return err
119114
}
120115

121-
if o.kubeConfigSavePath != "" {
116+
if kubeConfigSavePath != "" {
122117
return clientcmd.WriteToFile(*finalConfig, kubeConfigSavePath)
123118
}
124119

0 commit comments

Comments
 (0)