Skip to content

chore: include generated assets in repo #2201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 76 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,74 @@ jobs:
name: Check operator CRDs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make manifests
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make -C operator manifests
- name: Check CRDs
run: |
git diff --exit-code --name-only
if [ $? -eq 0 ]; then
echo "CRDs are up to date"
else
echo "CRDs are out of date"
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: "**/*.sum"
- name: Make manifests
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make -C operator manifests
- name: Check CRDs
run: |
git diff --exit-code --name-only
if [ $? -eq 0 ]; then
echo "CRDs are up to date"
else
echo "CRDs are out of date"
exit 1
fi

check-swagger-docs:
name: Check swagger docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: "**/*.sum"
- name: Check swagger docs
run: |
make -C api swagger
git diff --exit-code --name-only
if [ $? -eq 0 ]; then
echo "Swagger docs are up to date"
else
echo "Swagger docs are out of date"
exit 1
fi

check-web:
name: Check web
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
working-directory: ./web
run: npm i
- name: Build
working-directory: ./web
run: npm run build
- name: Check web is up to date
run: |
git diff --exit-code --name-only
if [ $? -eq 0 ]; then
echo "Web is up to date"
else
echo "Web is out of date"
exit 1
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, why don't we build the web assets on CI VS having to locally build it and commit it? Things such as npm install are non-deterministic, meaning my local web build can be different from yours. In CI we can make sure we have reproducible builds via specific node+npm versions and commands such as npm ci for example.


buildtools:
name: Build buildtools
Expand Down Expand Up @@ -817,6 +870,8 @@ jobs:
- dryrun-tests
- check-images
- check-operator-crds
- check-swagger-docs
- check-web
if: always()
steps:
# https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context
Expand All @@ -841,5 +896,11 @@ jobs:
- name: fail if check-operator-crds job was not successful
if: needs.check-operator-crds.result != 'success'
run: exit 1
- name: fail if check-swagger-docs job was not successful
if: needs.check-swagger-docs.result != 'success'
run: exit 1
- name: fail if check-web job was not successful
if: needs.check-web.result != 'success'
run: exit 1
- name: succeed if everything else passed
run: echo "Validation succeeded"
2 changes: 1 addition & 1 deletion api/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL := /bin/bash

.PHONY: swagger
swagger:
swagger: swag
swag fmt -g api.go
swag init --v3.1 -g api.go

Expand Down
2 changes: 0 additions & 2 deletions web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ yarn-debug.log*
yarn-error.log*
package-lock.json

dist/*
!dist/README.md
/history

#editors
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions web/dist/assets/index-D1uMJ1Gn.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading