Build script, search index, tags

This commit is contained in:
Vincent Fiduccia
2018-05-08 11:53:24 -07:00
parent 4e902c8819
commit 151e5da755
3 changed files with 26 additions and 11 deletions
@@ -9,8 +9,8 @@ weight: 200
The images can be found on [DockerHub](https://hub.docker.com/r/rancher/rancher/tags/).
- `rancher/rancher:latest`: Our latest development builds. These builds are validated through our CI automation framework. These releases aren't for production environments.
- `rancher/rancher:latest`: Our latest development release. These builds are validated through our CI automation framework. These releases are not recommended for production environments.
<!-- - `rancher/rancher:stable`: Our latest stable release builds. This tag is recommended for production. -->
<!-- - `rancher/rancher:stable`: Our newest stable release. This tag is recommended for production. -->
Please don't use the `master` tag or any release with a `rc{n}` suffix. These builds are meant for the {{< product >}} team to test out builds.
Any tag with a `-rc` or other suffix is meant for the {{< product >}} testing team to validate. You should not use these tags, and upgrading from or to a `rc` build is not supported.
+3 -3
View File
@@ -34,19 +34,19 @@ gulp.task('dev', ['build-dev'], () => {
});
gulp.task('build', (cb) => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo' /*, 'hugo-search-index'*/, () => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo' , 'hugo-search-index', () => {
cb();
});
});
gulp.task('build-staging', (cb) => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo-staging' /*, 'hugo-search-index'*/, () => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo-staging' , 'hugo-search-index', () => {
cb();
});
});
gulp.task('build-dev', (cb) => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo-dev' /*, 'hugo-search-index'*/, () => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo-dev' , 'hugo-search-index', () => {
cb();
});
});
+20 -5
View File
@@ -1,7 +1,11 @@
#!/bin/bash
set -e
PORT=9001
IMAGE=rancher/docs
TAG=dev
THEME=
BUILD=
# cd to app root
CWD=$(dirname $0)
@@ -16,8 +20,9 @@ print_help()
cat 1>&2 <<EOF
Usage:
[-p PORT] [-t]
[-n] [-p PORT] [-t]
-b - Build the image instead of pulling from the registry
-p PORT - Port to listen on
-t DIR - Use DIR to for the theme, to devlop the theme at the same time
@@ -35,8 +40,11 @@ absolute() {
}
while getopts ":p:t:" opt;do
while getopts ":bp:t:" opt;do
case $opt in
b)
BUILD="true"
;;
p)
PORT="${OPTARG}"
;;
@@ -57,12 +65,19 @@ while getopts ":p:t:" opt;do
done
THEMEVOLUME=""
echo "Starting server on http://localhost:${PORT}"
if [[ "$THEME" ]]; then
echo "Using theme from ${THEME}"
ABSOLUTE=$(absolute $THEME)
THEMEVOLUME="-v ${ABSOLUTE}:/run/node_modules/rancher-website-theme"
fi
docker pull rancher/docs:dev
docker run --rm -p ${PORT}:${PORT} -it -v $(pwd):/site ${THEMEVOLUME} rancher/docs:dev dev --port=${PORT}
if [ -z "$BUILD" ]; then
docker pull ${IMAGE}:${TAG}
else
echo "Building ${IMAGE}:${TAG}"
TAG=local
docker build -f Dockerfile.dev -t ${IMAGE}:${TAG} .
fi
echo "Starting server on http://localhost:${PORT}"
docker run --rm -p ${PORT}:${PORT} -it -v $(pwd):/site ${THEMEVOLUME} ${IMAGE}:${TAG} dev --port=${PORT}