Skip to content

Commit

Permalink
build web outside of melange
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig O'Donnell committed Jan 2, 2024
1 parent 462b3de commit 57b69a9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 21 deletions.
1 change: 1 addition & 0 deletions .github/workflows/alpha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
id-token: write # required to be able to assume the GCP SA identity to pull private Chainguard packages.
steps:
- uses: actions/checkout@v4
# TODO: need to build web as the image depends on the static assets
- uses: ./.github/actions/build-push-kotsadm-image
with:
chainguard-gcp-wif-pool: ${{ secrets.CHAINGUARD_GCP_WIF_POOL }}
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ jobs:

build-kots:
runs-on: ubuntu-20.04
needs: [ can-run-ci, build-web, deps-kots, generate-tag ]
needs: [ can-run-ci, deps-kots, generate-tag ]

steps:
- uses: actions/checkout@v4
Expand All @@ -247,12 +247,6 @@ jobs:
go-version: '^1.20.0'
cache: true

- name: Download web artifact
uses: actions/download-artifact@v4
with:
name: web
path: ./web/dist

- name: Build kots
env:
GIT_TAG: ${{ needs.generate-tag.outputs.tag }}
Expand All @@ -266,7 +260,7 @@ jobs:

build-kotsadm:
runs-on: ubuntu-20.04
needs: [ can-run-ci, generate-tag ]
needs: [ can-run-ci, build-web, generate-tag ]
permissions:
id-token: write # required to be able to assume the GCP SA identity to pull private Chainguard packages.
steps:
Expand All @@ -283,6 +277,11 @@ jobs:
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Download web artifact
uses: actions/download-artifact@v4
with:
name: web
path: ./web/dist
- uses: ./.github/actions/build-push-kotsadm-image
with:
chainguard-gcp-wif-pool: ${{ secrets.CHAINGUARD_GCP_WIF_POOL }}
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:

build-kots:
runs-on: ubuntu-20.04
needs: [build-web, generate-tag]
needs: [generate-tag]
steps:
- uses: actions/setup-go@v5
with:
Expand All @@ -94,11 +94,6 @@ jobs:
key: ${{ runner.os }}-go-kots-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-kots-
- name: Download web artifact
uses: actions/download-artifact@v4
with:
name: web
path: ./web/dist
- name: Build KOTS
env:
GIT_TAG: ${{ needs.generate-tag.outputs.tag }}
Expand All @@ -112,13 +107,19 @@ jobs:

build-kotsadm:
runs-on: ubuntu-20.04
needs: [generate-tag]
needs: [build-web, generate-tag]
permissions:
id-token: write # required to be able to assume the GCP SA identity to pull private Chainguard packages.
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download web artifact
uses: actions/download-artifact@v4
with:
name: web
path: ./web/dist

- uses: ./.github/actions/build-push-kotsadm-image
with:
chainguard-gcp-wif-pool: ${{ secrets.CHAINGUARD_GCP_WIF_POOL }}
Expand Down
6 changes: 0 additions & 6 deletions deploy/melange.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ environment:
- busybox
- git
- go
- nodejs
- yarn
environment:
GOMODCACHE: '/var/cache/melange'

Expand Down Expand Up @@ -57,10 +55,6 @@ pipeline:
# TODO: fix pact build error on arm https://github.com/pact-foundation/pact-js-core/issues/264
export PACT_SKIP_BINARY_INSTALL=true

# Configure Yarn
yarn install --pure-lockfile --network-concurrency 1 --network-timeout 600000

make -C web deps build-kotsadm
make kots build

mv bin/kotsadm "${DESTDIR}/kotsadm"
Expand Down

0 comments on commit 57b69a9

Please sign in to comment.