Ver Fonte

HUE-8846 [ci] Add doc site building

Romain há 6 anos atrás
pai
commit
edbae28030
3 ficheiros alterados com 14 adições e 4 exclusões
  1. 1 0
      .circleci/config.yml
  2. 6 2
      Makefile
  3. 7 2
      tools/docker/hue/Dockerfile

+ 1 - 0
.circleci/config.yml

@@ -49,6 +49,7 @@ jobs:
             cp -r apps /usr/share/hue/apps
             cp -r docs /usr/share/hue/docs
             make npm-install
+            make doc
 
       # Run tests
       - run:

+ 6 - 2
Makefile

@@ -95,7 +95,7 @@ default:
 	@echo '  clean       : Remove desktop build products'
 	@echo '  distclean   : Remove desktop and thirdparty build products'
 # <<<< DEV ONLY
-	@echo '  docs        : Build documentation'
+	@echo '  doc 	       : Build documentation'
 	@echo '  prod        : Generate a tar file for production distribution'
 	@echo '  locales     : Extract strings and update dictionary of each locale'
 	@echo '  ace         : Builds the Ace Editor tool'
@@ -108,7 +108,7 @@ all: default
 include Makefile.tarball
 
 ###################################
-# Build docs
+# Build docs (unused)
 ###################################
 .PHONY: docs
 docs:
@@ -228,6 +228,10 @@ npm-install:
 	npm run webpack-workers
 	# Redundancy but needs to happen
 	./build/env/bin/hue collectstatic --noinput
+
+.PHONY: doc
+doc:
+	hugo --source docs/docs-site
 # END DEV ONLY >>>>
 
 

+ 7 - 2
tools/docker/hue/Dockerfile

@@ -38,7 +38,7 @@ RUN apt-get update -y && apt-get install -y \
 ADD . /hue
 WORKDIR /hue
 
-# Not doing a `make prod` equivalent, so manually getting production ini
+# Not doing a `make prod`, so manually getting production ini
 RUN rm desktop/conf/*
 COPY desktop/conf.dist desktop/conf
 
@@ -49,10 +49,15 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - \
 RUN PREFIX=/usr/share make install
 RUN useradd -ms /bin/bash hue && chown -R hue /usr/share/hue
 
+# Only keep install dir
 WORKDIR  /usr/share/hue
-
 RUN rm -rf /hue
 
+# Build the docs (not in Makefile yet)
+RUN snap install hugo
+RUN hugo --source docs/docs-site
+
+# Install DB connectors
 RUN ./build/env/bin/pip install psycopg2-binary
 
 COPY tools/docker/hue/conf desktop/conf