Skip to content

Commit ef7eceb

Browse files
authored
[gha] fix build + docker build (#16798)
1 parent 805beca commit ef7eceb

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ Does this PR require updates to the documentation at www.gitpod.io/docs?
3434
- [ ] /werft with-werft
3535
Run the build with werft instead of GHA
3636
- [ ] leeway-no-cache
37-
leeway-target=components:all
3837
- [ ] /werft no-test
3938
Run Leeway with `--dont-test`
4039

.github/workflows/build.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
preview_infra_provider: ${{ contains( steps.pr-details.outputs.pr_body, '[X] /werft with-gce-vm') && 'gce' || 'harvester' }}
2828
build_no_cache: ${{ contains( steps.pr-details.outputs.pr_body, '[x] leeway-no-cache') }}
2929
build_no_test: ${{ contains( steps.pr-details.outputs.pr_body, '[x] /werft no-test') }}
30-
build_leeway_target: ${{ steps.output.outputs.build_leeway_target }}
3130
with_large_vm: ${{ contains( steps.pr-details.outputs.pr_body, '[X] /werft with-large-vm') }}
3231
publish_to_npm: ${{ contains( steps.pr-details.outputs.pr_body, '[X] /werft publish-to-npm') }}
3332
publish_to_jbmp: ${{ contains( steps.pr-details.outputs.pr_body, '[X] /werft publish-to-jb-marketplace') }}
@@ -68,7 +67,6 @@ jobs:
6867
shell: bash
6968
run: |
7069
{
71-
echo "build_leeway_target=$(echo "$PR_DESC" | sed -n -e 's/^.*leeway-target=//p' | sed 's/\r$//')"
7270
echo "workspace_feature_flags=$(echo "$PR_DESC" | grep -oP '(?<=\[X\] workspace-feature-flags).*')"
7371
} >> $GITHUB_OUTPUT
7472
@@ -211,6 +209,21 @@ jobs:
211209
npm-auth-token:gitpod-core-dev/npm-auth-token
212210
jb-marketplace-publish-token:gitpod-core-dev/jb-marketplace-publish-token
213211
codecov-token:gitpod-core-dev/codecov
212+
- name: Dev Build
213+
id: dev-build
214+
env:
215+
JAVA_HOME: /home/gitpod/.sdkman/candidates/java/current
216+
VERSION: ${{needs.configuration.outputs.version}}
217+
shell: bash
218+
working-directory: /workspace/gitpod
219+
run: |
220+
leeway build dev:all \
221+
--docker-build-options network=host \
222+
--cache remote \
223+
-Dversion=$VERSION \
224+
-DlocalAppVersion=$VERSION \
225+
-DimageRepoBase=eu.gcr.io/gitpod-core-dev/dev
226+
214227
- name: Leeway Build
215228
id: leeway
216229
shell: bash
@@ -223,7 +236,6 @@ jobs:
223236
SEGMENT_IO_TOKEN: '${{ steps.secrets.outputs.segment-io-token }}'
224237
PR_NO_CACHE: ${{needs.configuration.outputs.build_no_cache}}
225238
PR_NO_TEST: ${{needs.configuration.outputs.build_no_test}}
226-
PR_LEEWAY_TARGET: ${{needs.configuration.outputs.build_leeway_target}}
227239
NPM_AUTH_TOKEN: '${{ steps.secrets.outputs.npm-auth-token }}'
228240
PUBLISH_TO_NPM: ${{ needs.configuration.outputs.publish_to_npm == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}
229241
JB_MARKETPLACE_PUBLISH_TOKEN: '${{ steps.secrets.outputs.jb-marketplace-publish-token }}'
@@ -232,23 +244,24 @@ jobs:
232244
run: |
233245
[[ "$PR_NO_CACHE" = "true" ]] && CACHE="none" || CACHE="remote"
234246
[[ "$PR_NO_TEST" = "true" ]] && TEST="--dont-test" || TEST=""
235-
[[ -z "$PR_LEEWAY_TARGET" ]] && PR_LEEWAY_TARGET="components:all"
236247
[[ "${PUBLISH_TO_NPM}" = 'true' ]] && NPM_PUBLISH_TRIGGER=$(date +%s%3N) || NPM_PUBLISH_TRIGGER="false"
237248
238249
mkdir -p /__w/gitpod/gitpod/test-coverage-report
239250
240251
RESULT=0
241252
set -x
242253
# CI=true is a var set by GHA. Unsetting it for the build, as yarn builds treat warnings as errors if that var is set to true
243-
CI= leeway build $PR_LEEWAY_TARGET \
254+
CI= leeway build \
244255
--cache $CACHE \
245256
$TEST \
246257
-Dversion=$VERSION \
258+
--docker-build-options network=host \
247259
-DlocalAppVersion=$VERSION \
248260
-DSEGMENT_IO_TOKEN=$SEGMENT_IO_TOKEN \
249261
-DpublishToNPM="${PUBLISH_TO_NPM}" \
250262
-DnpmPublishTrigger="${NPM_PUBLISH_TRIGGER}" \
251263
-DpublishToJBMarketplace="${PUBLISH_TO_JBPM}" \
264+
-DimageRepoBase=eu.gcr.io/gitpod-core-dev/build \
252265
--coverage-output-path=/__w/gitpod/gitpod/test-coverage-report \
253266
--report report.html || RESULT=$?
254267
set +x

0 commit comments

Comments
 (0)