Преглед изворни кода

Fixing CI for docs versioning

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Docs пре 4 година
родитељ
комит
0cb0719cde
2 измењених фајлова са 4 додато и 7 уклоњено
  1. 1 4
      hack/api-docs/Dockerfile
  2. 3 3
      hack/api-docs/Makefile

+ 1 - 4
hack/api-docs/Dockerfile

@@ -12,7 +12,6 @@
 # limitations under the License.
 # limitations under the License.
 
 
 FROM alpine:3.11
 FROM alpine:3.11
-
 COPY requirements.txt /
 COPY requirements.txt /
 RUN apk add -U --no-cache \
 RUN apk add -U --no-cache \
     python3 \
     python3 \
@@ -24,6 +23,4 @@ RUN apk add -U --no-cache \
     bash \
     bash \
     gcc \
     gcc \
     diffutils \
     diffutils \
-  && pip3 install -r /requirements.txt \
-  && git config --global user.email "docs@external-secrets.io" \
-  && git config --global user.name "Docs"
+  && pip3 install -r /requirements.txt

+ 3 - 3
hack/api-docs/Makefile

@@ -42,7 +42,7 @@ all: build
 
 
 .PHONY: image
 .PHONY: image
 image:
 image:
-	$(DOCKER) build -t $(MKDOCS_IMAGE) -f Dockerfile .
+	$(DOCKER) build -t $(MKDOCS_IMAGE) --build-arg USER_ID=$(UID) -f Dockerfile .
 
 
 .PHONY: build
 .PHONY: build
 build: image generate $(SOURCES)
 build: image generate $(SOURCES)
@@ -53,7 +53,7 @@ build: image generate $(SOURCES)
 		--rm \
 		--rm \
 		--user $(UID):$(GID) \
 		--user $(UID):$(GID) \
 		$(MKDOCS_IMAGE) \
 		$(MKDOCS_IMAGE) \
-		/bin/bash -c "cd /repo && $(MIKE) deploy --update-aliases -F hack/api-docs/mkdocs.yml $(DOCS_VERSION) $(DOCS_ALIAS);"
+		/bin/bash -c "cd /repo && git config user.email "docs@external-secrets.io" && git config user.name "Docs" && $(MIKE) deploy --update-aliases -F hack/api-docs/mkdocs.yml $(DOCS_VERSION) $(DOCS_ALIAS);"
 
 
 .PHONY: build.publish
 .PHONY: build.publish
 build.publish: image generate $(SOURCES)
 build.publish: image generate $(SOURCES)
@@ -64,7 +64,7 @@ build.publish: image generate $(SOURCES)
 		--rm \
 		--rm \
 		--user $(UID):$(GID) \
 		--user $(UID):$(GID) \
 		$(MKDOCS_IMAGE) \
 		$(MKDOCS_IMAGE) \
-		/bin/bash -c "cd /repo && $(MIKE) deploy --update-aliases -p -F hack/api-docs/mkdocs.yml $(DOCS_VERSION) $(DOCS_ALIAS);"
+		/bin/bash -c "cd /repo && git config user.email "docs@external-secrets.io" && git config user.name "Docs" && $(MIKE) deploy --update-aliases -p -F hack/api-docs/mkdocs.yml $(DOCS_VERSION) $(DOCS_ALIAS);"
 
 
 .PHONY: generate
 .PHONY: generate
 generate:
 generate: