mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 15:02:07 -03:30
Add npm cache path to fix UI building (push images job) (#16097)
* Add npm cache path to fix UI building * skip version switch
This commit is contained in:
parent
d0a99c37c1
commit
f1edbd8ef5
4
.github/workflows/stage.yml
vendored
4
.github/workflows/stage.yml
vendored
@ -85,9 +85,11 @@ jobs:
|
|||||||
cp ../awx-logos/awx/ui/client/assets/* awx/ui/public/static/media/
|
cp ../awx-logos/awx/ui/client/assets/* awx/ui/public/static/media/
|
||||||
|
|
||||||
- name: Setup node and npm for new UI build
|
- name: Setup node and npm for new UI build
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '18'
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: awx/awx/ui/**/package-lock.json
|
||||||
|
|
||||||
- name: Prebuild new UI for awx image (to speed up build process)
|
- name: Prebuild new UI for awx image (to speed up build process)
|
||||||
working-directory: awx
|
working-directory: awx
|
||||||
|
|||||||
@ -87,7 +87,14 @@ ui/src/webpack: $(UI_DIR)/src/node_modules/webpack
|
|||||||
## True target for ui/src/webpack.
|
## True target for ui/src/webpack.
|
||||||
$(UI_DIR)/src/node_modules/webpack:
|
$(UI_DIR)/src/node_modules/webpack:
|
||||||
@echo "=== Installing webpack ==="
|
@echo "=== Installing webpack ==="
|
||||||
@cd $(UI_DIR)/src && n 18 && npm install webpack
|
@cd $(UI_DIR)/src && \
|
||||||
|
maj=$$(node -p "process.versions.node.split('.')[0]"); \
|
||||||
|
if [ "$$maj" != "18" ]; then \
|
||||||
|
echo "Error: Need Node 18.x; found $$(node -v)" >&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
npm install webpack
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean/ui
|
.PHONY: clean/ui
|
||||||
## Clean ui
|
## Clean ui
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user