diff --git a/.github/workflows/test-conformance.yaml b/.github/workflows/test-conformance.yaml index f7bcf3c7b..6373d8f92 100644 --- a/.github/workflows/test-conformance.yaml +++ b/.github/workflows/test-conformance.yaml @@ -30,11 +30,6 @@ jobs: with: go-version: ${{ env.GO_VERSION }} - - name: Avoid generating webui - run: | - mkdir webui/static - touch webui/static/index.html - - name: K8s Gateway API conformance test and report run: | make test-gateway-api-conformance diff --git a/.github/workflows/test-integration.yaml b/.github/workflows/test-integration.yaml index 72d2fdda1..0f7504c06 100644 --- a/.github/workflows/test-integration.yaml +++ b/.github/workflows/test-integration.yaml @@ -30,11 +30,6 @@ jobs: go-version: ${{ env.GO_VERSION }} check-latest: true - - name: Avoid generating webui - run: | - mkdir webui/static - touch webui/static/index.html - - name: Build binary run: make binary-linux-amd64 @@ -74,11 +69,6 @@ jobs: go-version: ${{ env.GO_VERSION }} check-latest: true - - name: Avoid generating webui - run: | - mkdir webui/static - touch webui/static/index.html - - name: Download traefik binary uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/test-unit.yaml b/.github/workflows/test-unit.yaml index eb5a7c387..d8d612a51 100644 --- a/.github/workflows/test-unit.yaml +++ b/.github/workflows/test-unit.yaml @@ -56,11 +56,6 @@ jobs: go-version: ${{ env.GO_VERSION }} check-latest: true - - name: Avoid generating webui - run: | - mkdir webui/static - touch webui/static/index.html - - name: Tests run: | go test -v -parallel 8 ${{ matrix.package.group }} diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 3a4ab93a0..470816bd5 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -27,11 +27,6 @@ jobs: go-version: ${{ env.GO_VERSION }} check-latest: true - - name: Avoid generating webui - run: | - mkdir webui/static - touch webui/static/index.html - - name: golangci-lint uses: golangci/golangci-lint-action@v7 with: @@ -55,11 +50,6 @@ jobs: - name: Install misspell ${{ env.MISSPELL_VERSION }} run: curl -sfL https://raw.githubusercontent.com/golangci/misspell/HEAD/install-misspell.sh | sh -s -- -b $(go env GOPATH)/bin ${MISSPELL_VERSION} - - name: Avoid generating webui - run: | - mkdir webui/static - touch webui/static/index.html - - name: Validate run: make validate-files diff --git a/Makefile b/Makefile index 0aaa11e56..470b5c3e8 100644 --- a/Makefile +++ b/Makefile @@ -35,12 +35,15 @@ build-webui-image: .PHONY: clean-webui #? clean-webui: Clean WebUI static generated assets clean-webui: - rm -rf webui/static + rm -r webui/static + mkdir -p webui/static + printf 'For more information see `webui/readme.md`' > webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md webui/static/index.html: $(MAKE) build-webui-image docker run --rm -v "$(PWD)/webui/static":'/src/webui/static' traefik-webui yarn build:prod docker run --rm -v "$(PWD)/webui/static":'/src/webui/static' traefik-webui chown -R $(shell id -u):$(shell id -g) ./static + printf 'For more information see `webui/readme.md`' > webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md .PHONY: generate-webui #? generate-webui: Generate WebUI diff --git a/webui/.gitignore b/webui/.gitignore index 7f7b4c885..541d4f563 100644 --- a/webui/.gitignore +++ b/webui/.gitignore @@ -59,3 +59,4 @@ Thumbs.db # static assets static/* +!static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md diff --git a/webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md b/webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md new file mode 100644 index 000000000..9481a99c3 --- /dev/null +++ b/webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md @@ -0,0 +1 @@ +For more information see `webui/readme.md` \ No newline at end of file