mirror of
https://github.com/project-zot/zot.git
synced 2024-12-30 22:34:13 -05:00
feat(ui): use a Makefile variable to download a pre-existing zui build (#1196)
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
parent
b9a75b2e44
commit
0cddb2be3e
2 changed files with 16 additions and 23 deletions
12
.github/workflows/ci-cd.yml
vendored
12
.github/workflows/ci-cd.yml
vendored
|
@ -42,18 +42,6 @@ jobs:
|
||||||
- name: Check out source code
|
- name: Check out source code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Push release tag to zui
|
|
||||||
if: github.event_name == 'release' && github.event.action == 'published' && matrix.os == 'linux' && matrix.arch == 'amd64'
|
|
||||||
uses: ncipollo/release-action@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.ZUI_TOKEN }}
|
|
||||||
repo: zui
|
|
||||||
owner: project-zot
|
|
||||||
tag: ${{ github.event.release.tag_name }}
|
|
||||||
name: ${{ github.event.release.name }}
|
|
||||||
body: ${{ github.event.release.body }}
|
|
||||||
commit: main
|
|
||||||
|
|
||||||
- name: Cache go dependencies
|
- name: Cache go dependencies
|
||||||
id: cache-go-dependencies
|
id: cache-go-dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|
27
Makefile
27
Makefile
|
@ -21,6 +21,7 @@ REGCLIENT := $(TOOLSDIR)/bin/regctl
|
||||||
REGCLIENT_VERSION := v0.4.5
|
REGCLIENT_VERSION := v0.4.5
|
||||||
ACTION_VALIDATOR := $(TOOLSDIR)/bin/action-validator
|
ACTION_VALIDATOR := $(TOOLSDIR)/bin/action-validator
|
||||||
ACTION_VALIDATOR_VERSION := v0.2.1
|
ACTION_VALIDATOR_VERSION := v0.2.1
|
||||||
|
ZUI_VERSION := v2.0.0-rc2
|
||||||
STACKER := $(TOOLSDIR)/bin/stacker
|
STACKER := $(TOOLSDIR)/bin/stacker
|
||||||
BATS := $(TOOLSDIR)/bin/bats
|
BATS := $(TOOLSDIR)/bin/bats
|
||||||
TESTDATA := $(TOP_LEVEL)/test/data
|
TESTDATA := $(TOP_LEVEL)/test/data
|
||||||
|
@ -384,19 +385,23 @@ $(COSIGN):
|
||||||
curl -fsSL https://github.com/sigstore/cosign/releases/download/v1.13.0/cosign-linux-amd64 -o $@; \
|
curl -fsSL https://github.com/sigstore/cosign/releases/download/v1.13.0/cosign-linux-amd64 -o $@; \
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
|
||||||
|
# set ZUI_VERSION to empty string in order to clone zui locally and build default branch
|
||||||
.PHONY: ui
|
.PHONY: ui
|
||||||
ui:
|
ui:
|
||||||
pwd=$$(pwd);\
|
if [ -z $(ZUI_VERSION) ]; then\
|
||||||
tdir=$$(mktemp -d);\
|
pwd=$$(pwd);\
|
||||||
cd $$tdir;\
|
tdir=$$(mktemp -d);\
|
||||||
if [ -z $(RELEASE_UI) ]; then\
|
cd $$tdir;\
|
||||||
git clone https://github.com/project-zot/zui.git;\
|
git clone https://github.com/project-zot/zui.git;\
|
||||||
|
cd zui;\
|
||||||
|
npm install;\
|
||||||
|
npm run build;\
|
||||||
|
cd $$pwd;\
|
||||||
|
rm -rf ./pkg/extensions/build;\
|
||||||
|
cp -R $$tdir/zui/build ./pkg/extensions/;\
|
||||||
else\
|
else\
|
||||||
git clone --depth 1 --branch $(RELEASE_TAG) https://github.com/project-zot/zui.git;\
|
curl -fsSL https://github.com/project-zot/zui/releases/download/$(ZUI_VERSION)/zui.tgz -o zui.tgz;\
|
||||||
|
tar xvzf zui.tgz -C ./pkg/extensions/;\
|
||||||
|
rm zui.tgz;\
|
||||||
fi;\
|
fi;\
|
||||||
cd zui;\
|
|
||||||
npm install;\
|
|
||||||
npm run build;\
|
|
||||||
cd $$pwd;\
|
|
||||||
rm -rf ./pkg/extensions/build;\
|
|
||||||
cp -R $$tdir/zui/build ./pkg/extensions/;
|
|
||||||
|
|
Loading…
Reference in a new issue