Skip to content

Commit f83e3bf

Browse files
committed
enable gha build by default
1 parent 1624cc6 commit f83e3bf

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
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

.github/workflows/build.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
version: ${{ steps.output.outputs.version }}
1919
preview_enable: ${{ steps.output.outputs.preview_enable }}
2020
preview_infra_provider: ${{ steps.output.outputs.preview_infra_provider }}
21-
with_github_actions: ${{ steps.output.outputs.with_github_actions }}
2221
build_no_cache: ${{ steps.output.outputs.build_no_cache }}
2322
build_no_test: ${{ steps.output.outputs.build_no_test }}
2423
build_leeway_target: ${{ steps.output.outputs.build_leeway_target }}
@@ -44,7 +43,6 @@ jobs:
4443
{
4544
echo "is_main_branch=${{ (github.head_ref || github.ref) == 'refs/heads/main' }}"
4645
echo "version=${{ steps.branches.outputs.sanitized-branch-name }}-gha.${{github.run_number}}"
47-
echo "with_github_actions=${{ contains(github.event.pull_request.body, '[x] /werft with-github-actions') }}"
4846
echo "preview_enable=${{ contains(github.event.pull_request.body, '[x] /werft with-preview') }}"
4947
echo "preview_infra_provider=${{ contains(github.event.pull_request.body, '[X] /werft with-gce-vm') && 'gce' || 'harvester' }}"
5048
echo "build_no_cache=${{ contains(github.event.pull_request.body, '[x] leeway-no-cache') }}"
@@ -64,6 +62,7 @@ jobs:
6462
build-previewctl:
6563
name: Build previewctl
6664
needs: [configuration]
65+
if: ${{ needs.configuration.preview_enable == 'true' || needs.configuration.is_main_branch == 'true' }}
6766
concurrency:
6867
group: ${{ github.head_ref || github.ref }}-build-previewctl
6968
# see comment in build-gitpod below for context
@@ -93,7 +92,7 @@ jobs:
9392
9493
infrastructure:
9594
needs: [configuration, build-previewctl]
96-
if: ${{ needs.configuration.outputs.preview_enable == 'true' && needs.configuration.outputs.with_github_actions == 'true' }}
95+
if: ${{ needs.configuration.outputs.preview_enable == 'true' }}
9796
runs-on: [self-hosted]
9897
concurrency:
9998
group: ${{ github.head_ref || github.ref }}-infrastructure
@@ -112,7 +111,6 @@ jobs:
112111
build-gitpod:
113112
name: Build Gitpod
114113
needs: [configuration]
115-
if: ${{ needs.configuration.outputs.is_main_branch == 'true' || needs.configuration.outputs.with_github_actions == 'true' }}
116114
runs-on: [self-hosted]
117115
concurrency:
118116
group: ${{ github.head_ref || github.ref }}-build-gitpod
@@ -196,9 +194,9 @@ jobs:
196194
PR_NO_TEST: ${{needs.configuration.outputs.build_no_test}}
197195
PR_LEEWAY_TARGET: ${{needs.configuration.outputs.build_leeway_target}}
198196
NPM_AUTH_TOKEN: '${{ steps.secrets.outputs.npm-auth-token }}'
199-
PUBLISH_TO_NPM: ${{ needs.configuration.outputs.publish_to_npm == 'true' }}
197+
PUBLISH_TO_NPM: ${{ needs.configuration.outputs.publish_to_npm == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}
200198
JB_MARKETPLACE_PUBLISH_TOKEN: '${{ steps.secrets.outputs.jb-marketplace-publish-token }}'
201-
PUBLISH_TO_JBPM: ${{ needs.configuration.outputs.publish_to_jbmp == 'true' }}
199+
PUBLISH_TO_JBPM: ${{ needs.configuration.outputs.publish_to_jbmp == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}
202200
CODECOV_TOKEN: '${{ steps.secrets.outputs.codecov-token }}'
203201
run: |
204202
[[ "$PR_NO_CACHE" = "true" ]] && CACHE="none" || CACHE="remote"

.werft/build.ts

Lines changed: 1 addition & 1 deletion
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)");

.werft/jobs/build/job-config.ts

Lines changed: 3 additions & 3 deletions
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)