Skip to content

Commit 42cbdce

Browse files
committed
[gha] enable gha build by default
1 parent b3e209e commit 42cbdce

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
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

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
outputs:
2222
is_main_branch: ${{ (github.head_ref || github.ref) == 'refs/heads/main' }}
2323
version: ${{ steps.branches.outputs.sanitized-branch-name }}-gha.${{github.run_number}}
24-
with_github_actions: ${{ contains( steps.pr-details.outputs.pr_body, '[x] /werft with-github-actions') }}
2524
preview_enable: ${{ contains( steps.pr-details.outputs.pr_body, '[x] /werft with-preview') }}
2625
preview_infra_provider: ${{ contains( steps.pr-details.outputs.pr_body, '[X] /werft with-gce-vm') && 'gce' || 'harvester' }}
2726
build_no_cache: ${{ contains( steps.pr-details.outputs.pr_body, '[x] leeway-no-cache') }}
@@ -37,6 +36,7 @@ jobs:
3736
analytics: ${{ contains( steps.pr-details.outputs.pr_body, '[X] analytics') }}
3837
workspace_feature_flags: ${{ steps.output.outputs.workspace_feature_flags }}
3938
pr_no_diff_skip: ${{ steps.pr-diff.outputs.pr_no_diff_skip }}
39+
with_werft: ${{ steps.output.outputs.with-werft }}
4040
steps:
4141
- name: "Determine Branch"
4242
id: branches
@@ -74,7 +74,7 @@ jobs:
7474
name: Build previewctl
7575
if: |
7676
(needs.configuration.outputs.pr_no_diff_skip != 'true') &&
77-
(needs.configuration.outputs.is_main_branch == 'true' || needs.configuration.outputs.preview_enable == 'true')
77+
(needs.configuration.outputs.preview_enable == 'true')
7878
needs: [ configuration ]
7979
concurrency:
8080
group: ${{ github.head_ref || github.ref }}-build-previewctl
@@ -112,7 +112,7 @@ jobs:
112112
needs: [ configuration, build-previewctl ]
113113
if: |
114114
(needs.configuration.outputs.pr_no_diff_skip != 'true') &&
115-
(needs.configuration.outputs.preview_enable == 'true' && needs.configuration.outputs.with_github_actions == 'true')
115+
(needs.configuration.outputs.preview_enable == 'true')
116116
runs-on: [ self-hosted ]
117117
concurrency:
118118
group: ${{ github.head_ref || github.ref }}-infrastructure
@@ -134,7 +134,7 @@ jobs:
134134
needs: [ configuration ]
135135
if: |
136136
(needs.configuration.outputs.pr_no_diff_skip != 'true') &&
137-
(needs.configuration.outputs.is_main_branch == 'true' || needs.configuration.outputs.with_github_actions == 'true')
137+
(needs.configuration.outputs.with_github_actions == 'true')
138138
runs-on: [ self-hosted ]
139139
concurrency:
140140
group: ${{ github.head_ref || github.ref }}-build-gitpod
@@ -218,9 +218,9 @@ jobs:
218218
PR_NO_TEST: ${{needs.configuration.outputs.build_no_test}}
219219
PR_LEEWAY_TARGET: ${{needs.configuration.outputs.build_leeway_target}}
220220
NPM_AUTH_TOKEN: '${{ steps.secrets.outputs.npm-auth-token }}'
221-
PUBLISH_TO_NPM: ${{ needs.configuration.outputs.publish_to_npm == 'true' }}
221+
PUBLISH_TO_NPM: ${{ needs.configuration.outputs.publish_to_npm == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}
222222
JB_MARKETPLACE_PUBLISH_TOKEN: '${{ steps.secrets.outputs.jb-marketplace-publish-token }}'
223-
PUBLISH_TO_JBPM: ${{ needs.configuration.outputs.publish_to_jbmp == 'true' }}
223+
PUBLISH_TO_JBPM: ${{ needs.configuration.outputs.publish_to_jbmp == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}
224224
CODECOV_TOKEN: '${{ steps.secrets.outputs.codecov-token }}'
225225
run: |
226226
[[ "$PR_NO_CACHE" = "true" ]] && CACHE="none" || CACHE="remote"

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)