Skip to content

Commit

Permalink
ci: Keep the UI asset's .gz file timestamps the same as the original …
Browse files Browse the repository at this point in the history
…file (#4879)

## Which problem is this PR solving?
- `make rebuild-ui` and `make build-ui` did not update the UI assets
according to the latest release

## Description of the changes
- This changes the timestamp of the copied `index.html.gz` asset file to
match the timestamp of the original asset. In turn, the timestamp of
that asset matches the date of the UI release. This allows the
combination of rebuild/build targets to always bring the UI assets in
sync with the actual commit pinned in the ui-submodule.

## How was this change tested?
- validated that CI runs normally
- ran manually on different versions of UI to ensure assets get copied
again

---------

Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro authored Oct 22, 2023
1 parent 6e5ba09 commit 3b47d6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,18 @@ cmd/query/app/ui/actual/index.html.gz: jaeger-ui/packages/jaeger-ui/build/index.
rm -rf cmd/query/app/ui/actual/*
cp -r jaeger-ui/packages/jaeger-ui/build/* cmd/query/app/ui/actual/
find cmd/query/app/ui/actual -type f | grep -v .gitignore | xargs gzip --no-name
# copy the timestamp for index.html.gz from the original file
touch -t $$(date -r jaeger-ui/packages/jaeger-ui/build/index.html '+%Y%m%d%H%M.%S') cmd/query/app/ui/actual/index.html.gz
ls -lF cmd/query/app/ui/actual/

jaeger-ui/packages/jaeger-ui/build/index.html:
$(MAKE) rebuild-ui

.PHONY: rebuild-ui
rebuild-ui:
bash ./scripts/rebuild-ui.sh
@echo "NOTE: This target only rebuilds the UI assets inside jaeger-ui/packages/jaeger-ui/build/."
@echo "NOTE: To make them usable from query-service run 'make build-ui'."

.PHONY: build-all-in-one-linux
build-all-in-one-linux:
Expand Down

0 comments on commit 3b47d6b

Please sign in to comment.