Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Migration files live in `awx/main/migrations/` (218 existing files).
| `awx/main/tests/settings_for_test.py` | Test settings (SQLite, in-memory cache) |
| `awx/settings/` | Settings modules: `defaults.py`, `development.py`, `production.py` |
| `awx/sso/` | SSO/LDAP/SAML backends + tests |
| `awx/ui/` | UI / React frontend (npm) |
| `awx/ui/` | UI / React frontend (pnpm) |
| `awx/ui_next/` | New UI (not currently used, built separately via `make ui-next`) |
| `awxkit/` | Python client library for the AWX API (own tox suite) |
| `requirements/` | Pinned deps: `requirements.txt`, `requirements_dev.txt`, `requirements_git.txt` |
Expand Down
36 changes: 18 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SHELL := bash
DOCKER_COMPOSE ?= docker compose
OFFICIAL ?= no
NODE ?= node
NPM_BIN ?= npm
PNPM_BIN ?= pnpm
KIND_BIN ?= $(shell which kind)
CHROMIUM_BIN=/tmp/chrome-linux/chrome
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
Expand Down Expand Up @@ -385,13 +385,13 @@ clean-ui:
mkdir -p awx/ui/build/static

awx/ui/node_modules:
NODE_OPTIONS=--max-old-space-size=6144 $(NPM_BIN) --prefix awx/ui --loglevel warn --force ci
NODE_OPTIONS=--max-old-space-size=6144 $(PNPM_BIN) --dir awx/ui install --frozen-lockfile

$(UI_BUILD_FLAG_FILE):
$(MAKE) awx/ui/node_modules
$(PYTHON) tools/scripts/compilemessages.py
$(NPM_BIN) --prefix awx/ui --loglevel warn run compile-strings
$(NPM_BIN) --prefix awx/ui --loglevel warn run build
$(PNPM_BIN) --dir awx/ui run compile-strings
$(PNPM_BIN) --dir awx/ui run build
touch $@

ui-release: $(UI_BUILD_FLAG_FILE)
Expand All @@ -408,26 +408,26 @@ ui-devel: awx/ui/node_modules
fi

ui-devel-test: awx/ui/node_modules
$(NPM_BIN) --prefix awx/ui --loglevel warn run start
$(PNPM_BIN) --dir awx/ui run start

ui-lint:
$(NPM_BIN) --prefix awx/ui install
$(NPM_BIN) run --prefix awx/ui lint
$(NPM_BIN) run --prefix awx/ui prettier-check
$(PNPM_BIN) --dir awx/ui install --frozen-lockfile
$(PNPM_BIN) --dir awx/ui run lint
$(PNPM_BIN) --dir awx/ui run prettier-check

ui-test:
$(NPM_BIN) --prefix awx/ui install
$(NPM_BIN) run --prefix awx/ui test
$(PNPM_BIN) --dir awx/ui install --frozen-lockfile
$(PNPM_BIN) --dir awx/ui run test

ui-test-screens:
$(NPM_BIN) --prefix awx/ui install
$(NPM_BIN) run --prefix awx/ui pretest
$(NPM_BIN) run --prefix awx/ui test-screens --runInBand
$(PNPM_BIN) --dir awx/ui install --frozen-lockfile
$(PNPM_BIN) --dir awx/ui run pretest
$(PNPM_BIN) --dir awx/ui run test-screens --runInBand

ui-test-general:
$(NPM_BIN) --prefix awx/ui install
$(NPM_BIN) run --prefix awx/ui pretest
$(NPM_BIN) run --prefix awx/ui/ test-general --runInBand
$(PNPM_BIN) --dir awx/ui install --frozen-lockfile
$(PNPM_BIN) --dir awx/ui run pretest
$(PNPM_BIN) --dir awx/ui run test-general --runInBand

HEADLESS ?= no
ifeq ($(HEADLESS), yes)
Expand Down Expand Up @@ -654,11 +654,11 @@ kind-dev-load: awx-kube-dev-build

## generate UI .pot file, an empty template of strings yet to be translated
pot: $(UI_BUILD_FLAG_FILE)
$(NPM_BIN) --prefix awx/ui --loglevel warn run extract-template --clean
$(PNPM_BIN) --dir awx/ui run extract-template --clean

## generate UI .po files for each locale (will update translated strings for `en`)
po: $(UI_BUILD_FLAG_FILE)
$(NPM_BIN) --prefix awx/ui --loglevel warn run extract-strings -- --clean
$(PNPM_BIN) --dir awx/ui run extract-strings -- --clean

## generate API django .pot .po
messages:
Expand Down
9 changes: 6 additions & 3 deletions awx/ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ ADD .linguirc .linguirc
ADD jsconfig.json jsconfig.json
ADD public public
ADD package.json package.json
ADD package-lock.json package-lock.json
ADD pnpm-lock.yaml pnpm-lock.yaml
COPY ${NPMRC_FILE} .npmrc
RUN npm ci && npm cache clean --force
# Installs the exact pnpm version pinned (and hash-verified) via the
# packageManager field in package.json, rather than duplicating the version
# in this Dockerfile where it could drift out of sync.
RUN corepack enable && corepack install && pnpm install --frozen-lockfile
ADD src src
EXPOSE 3001
CMD [ "npm", "start" ]
CMD [ "pnpm", "start" ]
Loading
Loading