Skip to content

Commit 9f510db

Browse files
committed
enable gha build by default
1 parent 0e792b9 commit 9f510db

File tree

4 files changed

+25
-24
lines changed

4 files changed

+25
-24
lines changed

Diff for: .github/pull_request_template.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Does this PR require updates to the documentation at www.gitpod.io/docs?
3131

3232
## Build Options:
3333

34-
- [ ] /werft with-github-actions
35-
Experimental feature to run the build with GitHub Actions (and not in Werft).
34+
- [ ] /werft with-werft
35+
Run the build with werft instead of GHA
3636
- [ ] leeway-no-cache
3737
leeway-target=components:all
3838
- [ ] /werft no-test

Diff for: .github/workflows/build.yml

+19-18
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ jobs:
1010

1111
configuration:
1212
name: Configure job parameters
13-
runs-on: [self-hosted]
14-
concurrency:
15-
group: ${{ github.head_ref || github.ref }}-configuration
16-
cancel-in-progress: true
13+
runs-on: [ssd-runner-set]
14+
# concurrency:
15+
# group: ${{ github.head_ref || github.ref }}-configuration
16+
# cancel-in-progress: true
1717
outputs:
1818
is_main_branch: ${{ steps.output.outputs.is_main_branch }}
1919
version: ${{ steps.output.outputs.version }}
2020
preview_enable: ${{ steps.output.outputs.preview_enable }}
2121
preview_infra_provider: ${{ steps.output.outputs.preview_infra_provider }}
22-
with_github_actions: ${{ steps.output.outputs.with_github_actions }}
2322
build_no_cache: ${{ steps.output.outputs.build_no_cache }}
2423
build_no_test: ${{ steps.output.outputs.build_no_test }}
2524
build_leeway_target: ${{ steps.output.outputs.build_leeway_target }}
@@ -32,6 +31,7 @@ jobs:
3231
with_slow_database: ${{ steps.output.outputs.with_slow_database }}
3332
analytics: ${{ steps.output.outputs.analytics }}
3433
workspace_feature_flags: ${{ steps.output.outputs.workspace_feature_flags }}
34+
with_werft: ${{ steps.output.outputs.with-werft }}
3535
steps:
3636
- name: "Determine Branch"
3737
id: branches
@@ -45,7 +45,6 @@ jobs:
4545
{
4646
echo "is_main_branch=${{ (github.head_ref || github.ref) == 'refs/heads/main' }}"
4747
echo "version=${{ steps.branches.outputs.sanitized-branch-name }}-gha.${{github.run_number}}"
48-
echo "with_github_actions=${{ contains(github.event.pull_request.body, '[x] /werft with-github-actions') }}"
4948
echo "preview_enable=${{ contains(github.event.pull_request.body, '[x] /werft with-preview') }}"
5049
echo "preview_infra_provider=${{ contains(github.event.pull_request.body, '[X] /werft with-gce-vm') && 'gce' || 'harvester' }}"
5150
echo "build_no_cache=${{ contains(github.event.pull_request.body, '[x] leeway-no-cache') }}"
@@ -59,17 +58,19 @@ jobs:
5958
echo "with_ee_license=${{ contains(github.event.pull_request.body, '[X] with-ee-license') }}"
6059
echo "with_slow_database=${{ contains(github.event.pull_request.body, '[X] with-slow-database') }}"
6160
echo "analytics=${{ contains(github.event.pull_request.body, '[X] analytics') }}"
61+
echo "with_werft=${{ contains(github.event.pull_request.body, '[x] /werft with-werft') }}"
6262
echo "workspace_feature_flags=$(echo "$PR_DESC" | grep -oP '(?<=\[X\] workspace-feature-flags).*')"
6363
} >> $GITHUB_OUTPUT
6464
6565
build-previewctl:
6666
name: Build previewctl
6767
needs: [configuration]
68+
if: ${{ needs.configuration.outputs.preview_enable == 'true' }}
6869
concurrency:
6970
group: ${{ github.head_ref || github.ref }}-build-previewctl
7071
# see comment in build-gitpod below for context
7172
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
72-
runs-on: [self-hosted]
73+
runs-on: [ssd-runner-set]
7374
container:
7475
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:mads-leeway-v0.7.3.4
7576
outputs:
@@ -99,8 +100,8 @@ jobs:
99100
100101
infrastructure:
101102
needs: [configuration, build-previewctl]
102-
if: ${{ needs.configuration.outputs.preview_enable == 'true' && needs.configuration.outputs.with_github_actions == 'true' }}
103-
runs-on: [self-hosted]
103+
if: ${{ needs.configuration.outputs.preview_enable == 'true' }}
104+
runs-on: [ssd-runner-set]
104105
concurrency:
105106
group: ${{ github.head_ref || github.ref }}-infrastructure
106107
steps:
@@ -118,13 +119,13 @@ jobs:
118119
build-gitpod:
119120
name: Build Gitpod
120121
needs: [configuration]
121-
if: ${{ needs.configuration.outputs.is_main_branch == 'true' || needs.configuration.outputs.with_github_actions == 'true' }}
122-
runs-on: [self-hosted]
123-
concurrency:
124-
group: ${{ github.head_ref || github.ref }}-build-gitpod
122+
runs-on: [ssd-runner-set]
123+
if: ${{ needs.configuration.with_werft != 'true' }}
124+
# concurrency:
125+
# group: ${{ github.head_ref || github.ref }}-build-gitpod
125126
# For the main branch we always want the build job to run to completion
126127
# For other branches we only care about the "latest" version, so it is fine to cancel in-progress builds
127-
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
128+
# cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
128129
services:
129130
mysql:
130131
image: mysql:5.7
@@ -202,9 +203,9 @@ jobs:
202203
PR_NO_TEST: ${{needs.configuration.outputs.build_no_test}}
203204
PR_LEEWAY_TARGET: ${{needs.configuration.outputs.build_leeway_target}}
204205
NPM_AUTH_TOKEN: '${{ steps.secrets.outputs.npm-auth-token }}'
205-
PUBLISH_TO_NPM: ${{ needs.configuration.outputs.publish_to_npm == 'true' }}
206+
PUBLISH_TO_NPM: ${{ needs.configuration.outputs.publish_to_npm == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}
206207
JB_MARKETPLACE_PUBLISH_TOKEN: '${{ steps.secrets.outputs.jb-marketplace-publish-token }}'
207-
PUBLISH_TO_JBPM: ${{ needs.configuration.outputs.publish_to_jbmp == 'true' }}
208+
PUBLISH_TO_JBPM: ${{ needs.configuration.outputs.publish_to_jbmp == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}
208209
CODECOV_TOKEN: '${{ steps.secrets.outputs.codecov-token }}'
209210
run: |
210211
[[ "$PR_NO_CACHE" = "true" ]] && CACHE="none" || CACHE="remote"
@@ -242,7 +243,7 @@ jobs:
242243
install:
243244
name: "Install Gitpod"
244245
needs: [configuration, build-previewctl, build-gitpod, infrastructure]
245-
runs-on: [self-hosted]
246+
runs-on: [ssd-runner-set]
246247
concurrency:
247248
group: ${{ github.head_ref || github.ref }}-install
248249
cancel-in-progress: true
@@ -266,7 +267,7 @@ jobs:
266267
monitoring:
267268
name: "Install Monitoring Satellite"
268269
needs: [infrastructure, build-previewctl]
269-
runs-on: [self-hosted]
270+
runs-on: [ssd-runner-set]
270271
concurrency:
271272
group: ${{ github.head_ref || github.ref }}-monitoring
272273
cancel-in-progress: true

Diff for: .werft/build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Tracing.initialize()
5454
async function run(context: any) {
5555
const config = jobConfig(werft, context);
5656

57-
if(config.withGitHubActions) {
57+
if(!config.withWerft) {
5858
werft.phase("Build Disabled");
5959
werft.log("(not building)","The build is being performed via GitHub Actions; Thus, this Werft build does not run");
6060
werft.done("(not building)");

Diff for: .werft/jobs/build/job-config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface JobConfig {
4444
certIssuer: string;
4545
recreatePreview: boolean;
4646
recreateVm: boolean;
47-
withGitHubActions: boolean;
47+
withWerft: boolean;
4848
useWsManagerMk2: boolean;
4949
withGceVm: boolean;
5050
}
@@ -116,7 +116,7 @@ export function jobConfig(werft: Werft, context: any): JobConfig {
116116
const analytics = parseAnalytics(werft, sliceId, buildConfig["analytics"])
117117
const withIntegrationTests = parseWithIntegrationTests(werft, sliceId, buildConfig["with-integration-tests"]);
118118
const withPreview = decideWithPreview({werft, sliceID: sliceId, buildConfig, mainBuild, withIntegrationTests})
119-
const withGitHubActions = "with-github-actions" in buildConfig;
119+
const withWerft = "with-werft" in buildConfig;
120120
const withGceVm = "with-gce-vm" in buildConfig;
121121

122122
switch (buildConfig["cert-issuer"]) {
@@ -188,7 +188,7 @@ export function jobConfig(werft: Werft, context: any): JobConfig {
188188
recreatePreview,
189189
recreateVm,
190190
withSlowDatabase,
191-
withGitHubActions,
191+
withWerft,
192192
withDedicatedEmulation,
193193
useWsManagerMk2,
194194
withGceVm,

0 commit comments

Comments
 (0)