diff --git a/.github/workflows/auto-gen-docs.yaml b/.github/workflows/auto-gen-docs.yaml index f446e72f4..2144a495c 100644 --- a/.github/workflows/auto-gen-docs.yaml +++ b/.github/workflows/auto-gen-docs.yaml @@ -10,6 +10,12 @@ on: - 'docs/**' - 'website/**' - 'assets/**' + pull_request: + types: [opened, synchronize, ready_for_review, reopened] + paths: + - 'docs/**' + - 'website/**' + - 'assets/**' jobs: # Set the job key. The key is displayed as the job name @@ -76,7 +82,7 @@ jobs: # Creates pull request with generated docs - name: Create Pull Request - if: env.IS_CHANGED == 'true' + if: env.IS_CHANGED == 'true' && github.event_name != 'pull_request' uses: peter-evans/create-pull-request@v5 with: commit-message: Auto-updated docs diff --git a/Makefile b/Makefile index 4d6c66480..39d69150c 100644 --- a/Makefile +++ b/Makefile @@ -479,22 +479,24 @@ helm-release-latest: helm # Download and build hugo extended locally if necessary HUGO_PATH = $(shell pwd)/bin/hugo -HUGO_VERSION = v0.113.0 -HAS_HUGO := $(shell $(HUGO_PATH)/hugo version 2>&- | grep $(HUGO_VERSION)) +HUGO_VERSION = 0.118.1 +HAS_HUGO := $(shell $(HUGO_PATH) version 2>&- | grep $(HUGO_VERSION)) hugo: ifeq ($(HAS_HUGO), ) @echo "Installing Hugo $(HUGO_VERSION)" - rm -rf $(HUGO_PATH) - git clone https://github.com/gohugoio/hugo.git --depth=1 --branch $(HUGO_VERSION) $(HUGO_PATH) - cd $(HUGO_PATH) && go build --tags extended -o hugo main.go + curl -L -O https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_Linux-64bit.tar.gz + tar -xzvf hugo_extended_$(HUGO_VERSION)_Linux-64bit.tar.gz hugo + rm hugo_extended_$(HUGO_VERSION)_Linux-64bit.tar.gz + mkdir -p bin + mv $(shell pwd)/hugo $(HUGO_PATH) endif .PHONY: generate-docs generate-docs: hugo ## Re-generate docs directory from the website directory @echo "+ $@" rm -rf docs || echo "Cannot remove docs dir, ignoring" - cd website && npm install - $(HUGO_PATH)/hugo -s website -d ../docs + cd website && npm install && npm install postcss postcss-cli autoprefixer + $(HUGO_PATH) -s website -d ../docs .PHONY: run-docs run-docs: hugo diff --git a/website/config.toml b/website/config.toml index 298086e2c..4f7ec8bd9 100644 --- a/website/config.toml +++ b/website/config.toml @@ -42,7 +42,7 @@ blog = "/:section/:year/:month/:day/:slug/" #latexDashes = true [markup] -defaultMarkdownHandler = "blackfriday" +defaultMarkdownHandler = "goldmark" # Image processing configuration. [imaging] @@ -134,4 +134,3 @@ no = 'Sorry to hear that. Please Details about base and user phase can be found [here](https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/architecture-and-design/). @@ -209,7 +209,7 @@ seed-job-agent-jenkins-example-758cc7cc5c-82hbl 1/1 Running 0 Install Docker Desktop. If you are using Docker Desktop for Windows, you will also need to install WSL or WSL2. Ensure that Docker Desktop is currently running, and that you have enabled Kubernetes in it. -Run **Jenkins Operator** locally. +Run **Jenkins Operator** locally. ```bash make config="config.docker-desktop.env" run ``` @@ -250,7 +250,7 @@ kubectl --context remote-k8s --namespace default get po ## Testing -Tests are written using [Ginkgo](https://onsi.github.io/ginkgo/) with [Gomega](https://onsi.github.io/gomega/). +Tests are written using [Ginkgo](https://onsi.github.io/ginkgo/) with [Gomega](https://onsi.github.io/gomega/). Run unit tests with go fmt, lint, staticcheck, vet: @@ -285,6 +285,15 @@ Run the specific e2e test: make e2e E2E_TEST_SELECTOR='^TestConfiguration$' ``` +### Running Bats tests + +Run bats tests in a `kind` cluster: + +```bash +make kind-setup +make bats-tests +``` + ### Building docker image on minikube To be able to work with the docker daemon on `minikube` machine run the following command before building an image: diff --git a/website/deploy.sh b/website/deploy.sh index a2c28f6b5..6fa8b5147 100755 --- a/website/deploy.sh +++ b/website/deploy.sh @@ -14,4 +14,4 @@ # rm -rf public/ HUGO_ENV="production" hugo --gc || exit 1 -s3deploy -source=public/ -region=eu-west-1 -bucket=bep.is -distribution-id=E8OKNT7W9ZYZ2 -path temp/td +#s3deploy -source=public/ -region=eu-west-1 -bucket=bep.is -distribution-id=E8OKNT7W9ZYZ2 -path temp/td diff --git a/website/themes/docsy/layouts/partials/head.html b/website/themes/docsy/layouts/partials/head.html index 303eb8b8f..9260be567 100644 --- a/website/themes/docsy/layouts/partials/head.html +++ b/website/themes/docsy/layouts/partials/head.html @@ -12,7 +12,6 @@ {{ partialCached "favicons.html" . }} {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }} {{- template "_internal/opengraph.html" . -}} -{{- template "_internal/google_news.html" . -}} {{- template "_internal/schema.html" . -}} {{- template "_internal/twitter_cards.html" . -}} {{ if eq (getenv "HUGO_ENV") "production" }} diff --git a/website/themes/docsy/netlify.toml b/website/themes/docsy/netlify.toml index a2d04f600..db364f563 100644 --- a/website/themes/docsy/netlify.toml +++ b/website/themes/docsy/netlify.toml @@ -3,6 +3,6 @@ command = "git submodule update -f --init && cd userguide && npm install postcss-cli && hugo --themesDir ../.." [build.environment] - HUGO_VERSION = "0.55.6" + HUGO_VERSION = "0.118.1" HUGO_THEME = "repo" NODE_VERSION = "12.2.0"