Skip to content
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

Continuous Release 1.15.3 #747

Merged
merged 2 commits into from
Feb 3, 2025
Merged

Continuous Release 1.15.3 #747

merged 2 commits into from
Feb 3, 2025

Conversation

Splines
Copy link
Member

@Splines Splines commented Feb 3, 2025

(Note that all Ruby gems are still up to date, so we just updated the Node.js deps)

Splines and others added 2 commits February 3, 2025 23:32
…rt (#736)

* Try out to mount local gems to docker container

* Install dependencies in initialize & use volume for bundle_cache

* Use bundle cache also for webpacker in dev

* Remove prometheus exporter statements from entrypoint

* Remove old comments from entrypoint

* Readd accidentally deleted rails statement

* Don't start prometheus exporter in dev environment

* Also use the volume for gems in test environment

* Make test env closer to dev & don't rebuild entire mampf

* Move entrypoint and init to docker folder

* Also install Node.js modules at container start

* Remove webpacker from justfile rebuild script

* Init commands to download latest database dump & reseed db from file (#731)

* Init first attempt to download latest database dump

* Overhaul just command to download the latest database dump

* Repurpose the download command to just download the dump

* Use existing /db/backups/ folder for storage

* Init dummy reseed from file command

* Check if preseed is url or file

* Move download db command to new `prod.justfile`

* Fix punctuation

* Init basic up-reseed-from-dump command (not tested yet)

* Tear down db, unzip dump, copy over and try to restore

(restoring is not working yet at this point)

* Get local restoring of the database to work

* Tear down database before up-reseed & fix pgadmin config

* Restart containers afterwards

* Make handling of empty database more robust

- Create mampf db if necessary
- Start db and wait for postgres automatically

* Move wait for postgres to db-tear-down method

* Don't wait for postgres at start of db-tear-down

* Clarify that up command assumes a valid database

* Change user name to localroot in test db

* Improve docstring of rebuild docker command

* Use localroot user also in test db

* Remove pull policy (defaults to 'missing')

https://github.com/compose-spec/compose-spec/blob/main/spec.md#pull_policy

* Bake dependencies into image on CI/CD (for better caching)

* Fail build on check violations

* Use mode max and set output type to registry (to trigger a push)

* Use `--push` as shorthand option

* Set output to type=registry again

* Build mampf image in test environment on CI/CD

* Use `run: >` to avoid manual multi-line breaking

* Overwrite mampf.build in CI/CD

* Use additional compose file to overwrite build section in CI/CD

* Add fs.read entitlements for buildx

* Use type=docker again & overwrite image name

* Pass IN_CI_CD via docker compose file

* Create empty mampf database

* Let waiting for MaMpf timeout after 1m

* Fix wrong indentation & make entrypoint-ci script executable

* Use postgres init script to always create empty mampf db

See https://docs.docker.com/guides/pre-seeding/#pre-seed-the-database-by-bind-mounting-a-sql-script

* Remove entrypoint-ci from docker dev setup

* Outsource cypress entrypoint script

* Remove entrypoint-ci entrypoint overwrite from CI/CD

* Make db-tear-down more reliable by removing the entire volume

* Redirecting webpacker output to run in background on GitHub Actions

* Use shorter syntax for volumes

* Use cypress run instead of cypress open in CI

* Remove entrypoint for dev setup in CI

* Split deps installing into two RUN commands

* Fix spelling mistake

* Simplify webpack dev server calling

* Precompile assets in CI/CD

* Explicitly use a bind mount

* Use ";" instead of "&&" in if statement

* Print folder contents for debugging

* Use shorter volume syntax again & fix wrong volume name

* Additionally print working directory for debugging

* Use github.workspace variable for volume bind mount

* Add dummy echos to trigger cache miss

* Try to only use github workspace bind (to test)

* Make dummy commit to trigger no caching

* Move env variable declaration to build step

* Copy app files to docker container to precompile assets

* Use Docker copy statement

* Try to manually set compile to false in webpacker test config

* Set new CI env variable in GitHub Actions

* Set compile to false manually

* Specify separate ci webpacker config

* Set NODE_ENV instead of RAILS_ENV

* Add missing test-ci config file

* Don't compile test packs to a separate directory

* Call NODE_ENV for webpacker config to be available during runtime

* Pass NODE_ENV to docker containers in CI/CD

* Remove custom filename for test-ci & specify NODE_ENV correctly

* Try setting compile back to true

* Try to set env variables before `bundle exec rspec`

* Add dependent build mampf step to avoid building twice

* Use docker image pull to pull from GHCR

* Pull image with debug flag

* Set cache manually, rename url & make permissions more granular

* Use correct flags

* Set target pattern for cache

* Set target output option to registry

See https://docs.docker.com/reference/cli/docker/buildx/build/#registry

* Specify ref as name in target.output

* Explicitly set tag & use registry as output type (shortcut)

* Use `tags` instead of `tag`

* Comment out build step and remove -f flag

* Try to pull only mampf service

* Embed build cache into image

* Only build image in build job

* Use full URL to reference mampf image when running test

* Explicitly set node env for mampf service

* Unify test-ci and test

* Set RAILS_ENV to test during assets precompiling

* Use [name]-[hash] pattern also in CI and set NODE_ENV

* Try to remove hash for filenames in test env

* Compile tests to separate directory

* Add back rails env to assets:precompile

* Use test database adapter instead

* Temporarily use previous webpacker test config

* Use anonymous volume for /usr/src/app/public

* Remove unnecessary variable setting on cypress tests

* Add another link for a great guide to webpacker.yml

* Revert "Temporarily use previous webpacker test config"

This reverts commit c8b9fa5.

* Also require testing environment for mampf build

* Extract CSS file in CI/CD

* Rename buildcache to cache

* Use registry cache exporter to allow for max-mode caching

* Don't require another approval for subsequent jobs (after build)

* Generate OCI-compatible image manifest

* Push image & buildcache separately, then import image later

* Try to specify tag for mampftest:image

* Add new environment (testing-review)

This is since we still need the testing environment to pass the CODECOV_TOKEN.

* Specify webpack-dev-server as dev dependency

* Only install production Node.js packages in CI/CD tests

* Never pull mampf image automatically

* Add recipe to run rspec via just

* Also install bundle dependencies when invoked via VSCode

* Remove unnecessary test dependencies

* Add install dependencies in test container command

* Increase timeout to 2min in Cypress entrypoint
All Ruby gems were up to date, so we just updated Node.js deps.
@Splines Splines added the release label Feb 3, 2025
@Splines Splines self-assigned this Feb 3, 2025
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.25%. Comparing base (dce5617) to head (b65f2fe).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #747   +/-   ##
=======================================
  Coverage   54.25%   54.25%           
=======================================
  Files         170      170           
  Lines        7356     7356           
=======================================
  Hits         3991     3991           
  Misses       3365     3365           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Splines Splines merged commit 872f7ac into main Feb 3, 2025
5 checks passed
@Splines Splines deleted the release/1.15.3 branch February 3, 2025 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants