From b6bb0a798333b70d0a7e5c1f123b666dfa40822c Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Mon, 18 Sep 2017 02:00:23 +0200 Subject: Convert doc site job to jjb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I87700e558dc20705f85a2ed78f8fe9df057e95e4 Signed-off-by: Jan-Simon Möller --- .../daily-jjb-doc-update.local.sh | 27 ++++++++++++++++++ jjb/daily-jjb-doc-update/daily-jjb-doc-update.yaml | 32 ++++++++++++++++++++++ jjb/daily-jjb-doc-update/include-doc-update.sh | 25 +++++++++++++++++ jjb/daily-jjb-doc-update/include-doc-upload.sh | 16 +++++++++++ 4 files changed, 100 insertions(+) create mode 100755 jjb/daily-jjb-doc-update/daily-jjb-doc-update.local.sh create mode 100644 jjb/daily-jjb-doc-update/daily-jjb-doc-update.yaml create mode 100644 jjb/daily-jjb-doc-update/include-doc-update.sh create mode 100644 jjb/daily-jjb-doc-update/include-doc-upload.sh diff --git a/jjb/daily-jjb-doc-update/daily-jjb-doc-update.local.sh b/jjb/daily-jjb-doc-update/daily-jjb-doc-update.local.sh new file mode 100755 index 00000000..0ff414bf --- /dev/null +++ b/jjb/daily-jjb-doc-update/daily-jjb-doc-update.local.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +#rm -rf docs-agl || true +# cloning git@github.com:automotive-grade-linux/docs-agl.git + +if test -d docs-agl; then + pushd docs-agl + git remote -v update + git reset --hard origin/master + popd +else + git clone git@github.com:automotive-grade-linux/docs-agl.git +fi + +pushd docs-agl + + . ../include-doc-update.sh + + pushd webdocs-agl + + ( sleep 7 ; firefox http://127.0.0.1:4000 ) & + make serve + + popd + + +popd \ No newline at end of file diff --git a/jjb/daily-jjb-doc-update/daily-jjb-doc-update.yaml b/jjb/daily-jjb-doc-update/daily-jjb-doc-update.yaml new file mode 100644 index 00000000..55186891 --- /dev/null +++ b/jjb/daily-jjb-doc-update/daily-jjb-doc-update.yaml @@ -0,0 +1,32 @@ +--- +- project: + name: daily-jjb-doc + jobs: + - daily-jjb-doc-update + +- job-template: + name: 'daily-jjb-doc-update' + project-type: freestyle + concurrent: false + node: agl-test-slave + description: "Managed by JJB. Do not Edit. \ +
Build time graph:
" + + build-discarder: + days-to-keep: 30 + num-to-keep: 40 + artifact-days-to-keep: -1 + artifact-num-to-keep: 5 + + triggers: + - timed: '@daily' + + wrappers: + - agl-infra-wrappers: + build-timeout: '{build-timeout}' + + builders: + - shell: + !include-raw-escape: include-doc-update.sh + - shell: + !include-raw-escape: include-doc-upload.sh diff --git a/jjb/daily-jjb-doc-update/include-doc-update.sh b/jjb/daily-jjb-doc-update/include-doc-update.sh new file mode 100644 index 00000000..47570151 --- /dev/null +++ b/jjb/daily-jjb-doc-update/include-doc-update.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +# 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 + +# build the docs +pushd webdocs-agl + make clean + make fetch + make build +popd \ 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 new file mode 100644 index 00000000..116f703f --- /dev/null +++ b/jjb/daily-jjb-doc-update/include-doc-upload.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# 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 + 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 + -- cgit 1.2.3-korg