-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run ide integration in separate werft job
- Loading branch information
Showing
6 changed files
with
135 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
args: | ||
- name: version | ||
desc: "The version of the integration tests to use" | ||
required: true | ||
- name: namespace | ||
desc: "The namespace to run the integration test against" | ||
required: true | ||
- name: username | ||
desc: "The username to run the integration test with" | ||
required: false | ||
pod: | ||
serviceAccount: werft | ||
nodeSelector: | ||
dev/workload: builds | ||
imagePullSecrets: | ||
- name: eu-gcr-io-pull-secret | ||
volumes: | ||
- name: gcp-sa | ||
secret: | ||
secretName: gcp-sa-gitpod-dev-deployer | ||
- name: config | ||
emptyDir: {} | ||
initContainers: | ||
- name: gcloud | ||
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:cw-dev-tools.2 | ||
workingDir: /workspace | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- name: gcp-sa | ||
mountPath: /mnt/secrets/gcp-sa | ||
readOnly: true | ||
- name: config | ||
mountPath: /config | ||
readOnly: false | ||
command: | ||
- bash | ||
- -c | ||
- | | ||
echo "[prep] preparing config." | ||
gcloud auth activate-service-account --key-file /mnt/secrets/gcp-sa/service-account.json | ||
cp -R /home/gitpod/.config/gcloud /config/gcloud | ||
cp /home/gitpod/.kube/config /config/kubeconfig | ||
echo "[prep] copied config..." | ||
containers: | ||
- name: tests | ||
image: eu.gcr.io/gitpod-core-dev/build/ide-integration-tests:{{ .Annotations.version }} | ||
workingDir: /workspace | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- name: config | ||
mountPath: /config | ||
readOnly: true | ||
command: | ||
- /bin/bash | ||
- -c | ||
- | | ||
sleep 1 | ||
set -Eeuo pipefail | ||
echo "[prep] receiving config..." | ||
mkdir /root/.config | ||
cp -R /config/gcloud /root/.config/gcloud | ||
export GOOGLE_APPLICATION_CREDENTIALS=/config/gcloud/legacy_credentials/[email protected]/adc.json | ||
echo "[prep] received config." | ||
USERNAME="{{ .Annotations.username }}" | ||
if [[ "$USERNAME" == "<no value>" ]]; then | ||
USERNAME="" | ||
fi | ||
echo "[prep] using username: $USERNAME" | ||
echo "[prep|DONE]" | ||
/entrypoint.sh -kubeconfig=/config/kubeconfig -namespace={{ .Annotations.namespace }} -username=$USERNAME 2>&1 | ts "[int-tests] " | ||
RC=${PIPESTATUS[0]} | ||
if [ $RC -eq 1 ]; then | ||
echo "[int-tests|FAIL]" | ||
else | ||
echo "[int-tests|DONE]" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) 2020 Gitpod GmbH. All rights reserved. | ||
# Licensed under the GNU Affero General Public License (AGPL). | ||
# See License-AGPL.txt in the project root for license information. | ||
|
||
FROM alpine:3.15 | ||
|
||
# Ensure latest packages are present, like security updates. | ||
RUN apk upgrade --no-cache \ | ||
&& apk add --no-cache \ | ||
ca-certificates \ | ||
coreutils | ||
|
||
# convenience scripting tools | ||
RUN apk add --no-cache bash moreutils | ||
|
||
COPY test--app/bin/ide-integration /tests | ||
ENV PATH=$PATH:/tests | ||
COPY entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT [ "/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters