Skip to content

Commit

Permalink
#4163 | Speed-up CI by using published UI artifacts (#4314)
Browse files Browse the repository at this point in the history
Which problem is this PR solving?

Resolves #4163


Short description of the changes

Issues raised by the previous pull request at
#4251

---------

Signed-off-by: shubbham1215 <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
  • Loading branch information
shubbham1215 and yurishkuro authored Mar 19, 2023
1 parent adfb97c commit 5ac3d8e
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions scripts/rebuild-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,26 @@ set -euxf -o pipefail

cd jaeger-ui

tag=$(git describe --exact-match --tags)
if [[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
temp_file=$(mktemp)
trap "rm -f ${temp_file}" EXIT
release_url="https://github.com/jaegertracing/jaeger-ui/releases/download/${tag}/assets.tar.gz"
if curl --silent --fail --location --output "$temp_file" "$release_url"; then
mkdir -p packages/jaeger-ui/build/
tar -zxvf "$temp_file" packages/jaeger-ui/build/
exit 0
LAST_TAG=$(git describe --abbrev=0 --tags 2>/dev/null)
BRANCH_HASH=$(git rev-parse HEAD)
LAST_TAG_HASH=$(git rev-parse $LAST_TAG)

if [[ "$BRANCH_HASH" == "$LAST_TAG_HASH" ]]; then

if [[ "$LAST_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
temp_file=$(mktemp)
trap "rm -f ${temp_file}" EXIT
release_url="https://github.com/jaegertracing/jaeger-ui/releases/download/${LAST_TAG}/assets.tar.gz"
if curl --silent --fail --location --output "$temp_file" "$release_url"; then

mkdir -p packages/jaeger-ui/build/
rm -r -f packages/jaeger-ui/build/
tar -zxvf "$temp_file" packages/jaeger-ui/build/
exit 0

fi
fi

fi

# do a regular full build
Expand Down

0 comments on commit 5ac3d8e

Please sign in to comment.