Skip to content

Commit a635d7c

Browse files
committed
Merge branch 'main' into aa/enable-gha
2 parents b7ad003 + 0e792b9 commit a635d7c

File tree

254 files changed

+16230
-10655
lines changed

Some content is hidden

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

254 files changed

+16230
-10655
lines changed

Diff for: .github/CODEOWNERS

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/components/ide-service @gitpod-io/engineering-ide
2525
/components/ide-service-api @gitpod-io/engineering-ide
2626
/components/ide-proxy @gitpod-io/engineering-ide
27-
/components/image-builder-api @csweichel @geropl
27+
/components/image-builder-api @gitpod-io/engineering-workspace
2828
/components/image-builder-bob @gitpod-io/engineering-workspace
2929
/components/image-builder-mk3 @gitpod-io/engineering-workspace
3030
/components/installation-telemetry @gitpod-io/engineering-security-infrastructure-and-delivery
@@ -88,7 +88,7 @@
8888
/components/workspacekit @gitpod-io/engineering-workspace
8989
/components/ws-daemon-api @aledbf @Furisto
9090
/components/ws-daemon @gitpod-io/engineering-workspace
91-
/components/ws-manager-api @aledbf @csweichel @kylos101
91+
/components/ws-manager-api @gitpod-io/engineering-workspace
9292
/components/ws-manager-bridge-api @gitpod-io/engineering-webapp
9393
/components/ws-manager-bridge @gitpod-io/engineering-webapp
9494
/components/ws-manager @gitpod-io/engineering-workspace

Diff for: .github/actions/deploy-gitpod/entrypoint.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ leeway run dev/preview/previewctl:download
2626
echo "Setting up access to core-dev and harvester"
2727
previewctl get-credentials --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
2828

29-
3029
PREVIEW_NAME="$(previewctl get-name --branch "${INPUT_NAME}")"
3130
export PREVIEW_NAME
3231

3332
for var in WITH_WS_MANAGER_MK2 WITH_DEDICATED_EMU WITH_EE_LICENSE WITH_SLOW_DATABASE ANALYTICS WORKSPACE_FEATURE_FLAGS; do
3433
input_var="INPUT_${var}"
35-
export GITPOD_${var}=${!input_var}
34+
if [[ -n "${!input_var:-}" ]];then
35+
export GITPOD_${var}=${!input_var}
36+
fi
3637
done
3738

3839
previewctl install-context --branch "${PREVIEW_NAME}" --log-level debug --timeout 10m --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}"

Diff for: .github/workflows/code-nightly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- run: |
3232
gcloud auth configure-docker --quiet
3333
export LEEWAY_WORKSPACE_ROOT=$(pwd)
34-
codeHeadCommit=$(curl -H 'Accept: application/vnd.github.VERSION.sha' https://api.github.com/repos/gitpod-io/openvscode-server/commits/gp-code/release/1.75)
34+
codeHeadCommit=$(curl -H 'Accept: application/vnd.github.VERSION.sha' https://api.github.com/repos/gitpod-io/openvscode-server/commits/gp-code/main)
3535
codeVersion=$(curl https://raw.githubusercontent.com/gitpod-io/openvscode-server/$codeHeadCommit/package.json | jq .version)
3636
cd components/ide/code
3737
leeway build -Dversion=nightly -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build -DcodeCommit=$codeHeadCommit -DcodeVersion=$codeVersion -DcodeQuality=insider .:docker

Diff for: .github/workflows/ide-integration-tests.yml

+104-7
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,56 @@ on:
88
version:
99
required: true
1010
description: "The version of Gitpod to install"
11+
skip_deploy:
12+
required: false
13+
description: "Skip deploy preview environment (debug only)"
14+
skip_delete:
15+
required: false
16+
description: "Skip delete preview environment (debug only)"
17+
schedule:
18+
- cron: "0 3 * * *"
1119
jobs:
1220
configuration:
1321
name: Configuration
1422
runs-on: [self-hosted]
23+
container:
24+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:mads-leeway-v0.7.3.4
1525
outputs:
1626
name: ${{ steps.configuration.outputs.name }}
1727
version: ${{ steps.configuration.outputs.version }}
1828
steps:
1929
- name: "Set outputs"
2030
id: configuration
31+
shell: bash
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2134
run: |
22-
if [[ '${{ github.event.inputs.name }}' != '' ]]; then
35+
if [[ '${{ github.event.inputs.name }}' != '' && '${{ github.event.inputs.name }}' != 'latest' ]]; then
2336
# The workflow was triggered by workflow_dispatch
2437
{
2538
echo "version=${{ github.event.inputs.version }}"
2639
echo "name=${{ github.event.inputs.name }}"
2740
} >> $GITHUB_OUTPUT
41+
else
42+
# others
43+
RUNID=$(gh run list -R gitpod-io/gitpod -b main -w Build --limit 1 --json databaseId --jq .[0].databaseId)
44+
if ! gh run watch "$RUNID" --exit-status -R gitpod-io/gitpod >/dev/null 2>&1; then
45+
echo main branch build is failed, see https://github.com/gitpod-io/gitpod/actions/runs/"$RUNID" for detail | tee -a $GITHUB_STEP_SUMMARY
46+
exit 1
47+
fi
48+
49+
{
50+
echo "version=$(gh run view "$RUNID" --log -R gitpod-io/gitpod | grep 'main-gha.[0-9]*' -o | head -n 1)"
51+
echo "name=ide-integration-test-${{ github.run_id }}-${{ github.run_attempt }}"
52+
} >> $GITHUB_OUTPUT
2853
fi
54+
- name: Slack Notification
55+
uses: rtCamp/action-slack-notify@v2
56+
if: failure()
57+
env:
58+
SLACK_WEBHOOK: ${{ secrets.IDE_SLACK_WEBHOOK }}
59+
SLACK_COLOR: ${{ job.status }}
60+
SLACK_MESSAGE: main branch build failed
2961
check:
3062
name: Check for regressions
3163
needs: [configuration]
@@ -39,25 +71,90 @@ jobs:
3971
with:
4072
name: ${{ needs.configuration.outputs.name }}
4173
infrastructure_provider: harvester
42-
large_vm: false
74+
large_vm: true
4375
sa_key: ${{ secrets.GCP_CREDENTIALS }}
4476
- name: Deploy Gitpod to the preview environment
77+
if: github.event.inputs.skip_deploy != 'true'
4578
id: deploy-gitpod
4679
uses: ./.github/actions/deploy-gitpod
4780
with:
4881
name: ${{ needs.configuration.outputs.name }}
4982
sa_key: ${{ secrets.GCP_CREDENTIALS }}
5083
version: ${{ needs.configuration.outputs.version}}
51-
- name: Check
84+
- name: Integration Test
85+
shell: bash
5286
env:
5387
ROBOQUAT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5488
USERNAME: ${{ secrets.IDE_INTEGRATION_TEST_USERNAME }}
55-
USER_TOKEN: $ {{ secrets.IDE_INTEGRATION_TEST_USER_TOKEN }}
89+
USER_TOKEN: ${{ secrets.IDE_INTEGRATION_TEST_USER_TOKEN }}
90+
PREVIEW_ENV_DEV_SA_KEY: ${{ secrets.GCP_CREDENTIALS }}
91+
PREVIEW_NAME: ${{ needs.configuration.outputs.name }}
5692
run: |
57-
echo "IDE tests would run here. Good luck Pudong 🧡"
58-
sleep 60
59-
- name: Delete preview environment
93+
set -euo pipefail
94+
95+
export LEEWAY_WORKSPACE_ROOT="$(pwd)"
96+
export HOME="/home/gitpod"
97+
export PREVIEW_ENV_DEV_SA_KEY_PATH="/home/gitpod/.config/gcloud/preview-environment-dev-sa.json"
98+
99+
echo "${PREVIEW_ENV_DEV_SA_KEY}" > "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
100+
gcloud auth activate-service-account --key-file "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
101+
102+
leeway run dev/preview/previewctl:install
103+
104+
echo "Setting up access to core-dev and harvester"
105+
previewctl get-credentials --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
106+
107+
previewctl install-context --branch "${PREVIEW_NAME}" --log-level debug --timeout 1m --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
108+
109+
# start integration test
110+
args=()
111+
args+=( "-kubeconfig=/home/gitpod/.kube/config" )
112+
args+=( "-namespace=default" )
113+
[[ "$USERNAME" != "" ]] && args+=( "-username=$USERNAME" )
114+
args+=( "-timeout=60m" )
115+
116+
IDE_TESTS_DIR="$GITHUB_WORKSPACE/test/tests/ide"
117+
JETBRAINS_TESTS="$IDE_TESTS_DIR/jetbrains"
118+
VSCODE_TESTS="$IDE_TESTS_DIR/vscode"
119+
SSH_TESTS="$IDE_TESTS_DIR/ssh"
120+
121+
go install github.com/jstemmer/go-junit-report/v2@latest
122+
123+
FAILURE_COUNT=0
124+
125+
IDE_TEST_LIST=("$SSH_TESTS" "$VSCODE_TESTS" "$JETBRAINS_TESTS")
126+
for TEST_PATH in "${IDE_TEST_LIST[@]}"
127+
do
128+
TEST_NAME=$(basename "${TEST_PATH}")
129+
echo "running integration for ${TEST_NAME}"
130+
131+
cd "${TEST_PATH}"
132+
set +e
133+
go test -v ./... "${args[@]}" 2>&1 | go-junit-report -subtest-mode=exclude-parents -set-exit-code -out "TEST-${TEST_NAME}.xml" -iocopy
134+
RC=${PIPESTATUS[0]}
135+
set -e
136+
137+
if [ "${RC}" -ne "0" ]; then
138+
FAILURE_COUNT=$((FAILURE_COUNT+1))
139+
fi
140+
done
141+
142+
exit $FAILURE_COUNT
143+
- name: Test Summary
144+
id: test_summary
145+
uses: test-summary/action@v2
146+
with:
147+
paths: "test/tests/**/TEST-*.xml"
60148
if: always()
149+
- name: Slack Notification
150+
uses: rtCamp/action-slack-notify@v2
151+
if: success() || failure()
152+
env:
153+
SLACK_WEBHOOK: ${{ secrets.IDE_SLACK_WEBHOOK }}
154+
SLACK_COLOR: ${{ job.status }}
155+
SLACK_MESSAGE: ${{ steps.test_summary.outputs.passed }}/${{ steps.test_summary.outputs.total }} tests passed
156+
- name: Delete preview environment
157+
if: github.event.inputs.skip_delete != 'true' && (success() || failure())
61158
uses: ./.github/actions/delete-preview
62159
with:
63160
name: ${{ needs.configuration.outputs.name }}

0 commit comments

Comments
 (0)