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

Conversation

emosbaugh
Copy link
Member

@emosbaugh emosbaugh commented May 28, 2025

What this PR does / why we need it:

Adds generated assets to repo and checks that they are up to date or fails the CI run.

Which issue(s) this PR fixes:

Does this PR require a test?

Does this PR require a release note?


Does this PR require documentation?

@emosbaugh emosbaugh changed the title Emosbaugh/sc 124145/build and include web in ci prod release chore: include generated assets in repo May 28, 2025
Copy link

github-actions bot commented May 28, 2025

This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID.

Online Installer:

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/appver-dev-171b990" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Airgap Installer (may take a few minutes before the airgap bundle is built):

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci-airgap/appver-dev-171b990?airgap=true" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Happy debugging!

@emosbaugh emosbaugh marked this pull request as ready for review May 28, 2025 03:45
Comment on lines 158 to 182
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.

Copy link
Member

@JGAntunes JGAntunes left a comment

Choose a reason for hiding this comment

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

Overall LGTM, have one suggestion and one question

Comment on lines 8 to 19
plugins: [
react(),
// Preserve README.md from .gitignore
viteStaticCopy({
targets: [
{
src: path.resolve(__dirname, './README.md'),
dest: './',
},
],
}),
],
Copy link
Member

Choose a reason for hiding this comment

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

Could you explain why we need this?

Copy link
Member Author

Choose a reason for hiding this comment

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

updated the comment

emosbaugh and others added 2 commits May 28, 2025 06:31
Co-authored-by: João Antunes <[email protected]>
@emosbaugh emosbaugh requested a review from JGAntunes May 28, 2025 13:36
@emosbaugh
Copy link
Member Author

Test failures are unrelated. Merging

@emosbaugh emosbaugh merged commit 48ea497 into main May 28, 2025
55 of 65 checks passed
@emosbaugh emosbaugh deleted the emosbaugh/sc-124145/build-and-include-web-in-ci-prod-release branch May 28, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants