aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/daily-jjb-doc-update
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/daily-jjb-doc-update')
-rw-r--r--jjb/daily-jjb-doc-update/daily-jjb-doc-update.yaml3
-rw-r--r--jjb/daily-jjb-doc-update/include-doc-update.sh30
-rw-r--r--jjb/daily-jjb-doc-update/include-doc-upload.sh24
3 files changed, 32 insertions, 25 deletions
diff --git a/jjb/daily-jjb-doc-update/daily-jjb-doc-update.yaml b/jjb/daily-jjb-doc-update/daily-jjb-doc-update.yaml
index 55186891..e95ce9f4 100644
--- a/jjb/daily-jjb-doc-update/daily-jjb-doc-update.yaml
+++ b/jjb/daily-jjb-doc-update/daily-jjb-doc-update.yaml
@@ -24,6 +24,9 @@
wrappers:
- agl-infra-wrappers:
build-timeout: '{build-timeout}'
+ - ssh-agent-credentials:
+ users:
+ - 'jenkins-github-agldocs'
builders:
- shell:
diff --git a/jjb/daily-jjb-doc-update/include-doc-update.sh b/jjb/daily-jjb-doc-update/include-doc-update.sh
index 47570151..a11cd850 100644
--- a/jjb/daily-jjb-doc-update/include-doc-update.sh
+++ b/jjb/daily-jjb-doc-update/include-doc-update.sh
@@ -1,25 +1,19 @@
#!/bin/bash
set -e
+#!/bin/bash
+set -e
+set -x
# we need a name and an email
#git config --global user.name build.automotivelinux.org
#git config --global user.email jenkins@automotivelinux.org
-git config user.name build.automotivelinux.org
-git config user.email jenkins@automotivelinux.org
-
-# make sure 'node' is in path (debian calls it nodejs)
-mkdir -p bin
-ln -sf /usr/bin/nodejs bin/node
-export PATH=$PATH:`pwd`/bin
-
-pushd doctools/webdocs
- npm install
- gem list
-popd
+git config --global user.name build.automotivelinux.org
+git config --global user.email jenkins@automotivelinux.org
-# build the docs
-pushd webdocs-agl
- make clean
- make fetch
- make build
-popd \ No newline at end of file
+rm -rf docs-webtemplate || true
+wget https://raw.githubusercontent.com/automotive-grade-linux/docs-webtemplate/master/setupdocs.sh
+mkdir docs-webtemplate
+bash -x setupdocs.sh --directory=docs-webtemplate --webtemplate-ref=master --doctools-ref=master
+# Todo --baseurl=/upload/ci/20018
+cd docs-webtemplate
+make build \ No newline at end of file
diff --git a/jjb/daily-jjb-doc-update/include-doc-upload.sh b/jjb/daily-jjb-doc-update/include-doc-upload.sh
index 116f703f..9914e374 100644
--- a/jjb/daily-jjb-doc-update/include-doc-upload.sh
+++ b/jjb/daily-jjb-doc-update/include-doc-upload.sh
@@ -1,16 +1,26 @@
#!/bin/bash
+set -e
+set -x
+
+[[ -z "$WORKSPACE" ]] && WORKSPACE=$(pwd -P)
+HTDOCS=${HTDOCS:-$WORKSPACE/docs-webtemplate/build-dev/}
+TMPDIR=${TMPDIR:-$WORKSPACE/upload-gh}
+
# publish the docs
-pushd webdocs-agl
- git clone -b gh-pages git@github.com:automotive-grade-linux/docs-agl.git upload-gh-pages
- cp -ar build-dev/* upload-gh-pages/
- pushd upload-gh-pages
+
+ssh-keyscan -H github.com >> ~/.ssh/known_hosts
+
+rm -rf $TMPDIR || true
+mkdir -p $TMPDIR
+git clone -b gh-pages git@github.com:automotive-grade-linux/docs-gh-pages.git $TMPDIR/upload-gh-pages
+mkdir -p $TMPDIR/upload-gh-pages/
+cp -ar $HTDOCS/* $TMPDIR/upload-gh-pages/
+pushd $TMPDIR/upload-gh-pages
git config user.name build.automotivelinux.org
git config user.email jenkins@automotivelinux.org
git diff
git add .
git commit --amend -m"Render: $(date)"
git push origin gh-pages:gh-pages -f
- popd
-popd
-
+popd \ No newline at end of file