mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-28 05:59:03 +00:00
Build script, search index, tags
This commit is contained in:
@@ -9,8 +9,8 @@ weight: 200
|
|||||||
|
|
||||||
The images can be found on [DockerHub](https://hub.docker.com/r/rancher/rancher/tags/).
|
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
@@ -34,19 +34,19 @@ gulp.task('dev', ['build-dev'], () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build', (cb) => {
|
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();
|
cb();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build-staging', (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();
|
cb();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build-dev', (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();
|
cb();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+20
-5
@@ -1,7 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
PORT=9001
|
PORT=9001
|
||||||
|
IMAGE=rancher/docs
|
||||||
|
TAG=dev
|
||||||
THEME=
|
THEME=
|
||||||
|
BUILD=
|
||||||
|
|
||||||
# cd to app root
|
# cd to app root
|
||||||
CWD=$(dirname $0)
|
CWD=$(dirname $0)
|
||||||
@@ -16,8 +20,9 @@ print_help()
|
|||||||
cat 1>&2 <<EOF
|
cat 1>&2 <<EOF
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
[-p PORT] [-t]
|
[-n] [-p PORT] [-t]
|
||||||
|
|
||||||
|
-b - Build the image instead of pulling from the registry
|
||||||
-p PORT - Port to listen on
|
-p PORT - Port to listen on
|
||||||
-t DIR - Use DIR to for the theme, to devlop the theme at the same time
|
-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
|
case $opt in
|
||||||
|
b)
|
||||||
|
BUILD="true"
|
||||||
|
;;
|
||||||
p)
|
p)
|
||||||
PORT="${OPTARG}"
|
PORT="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
@@ -57,12 +65,19 @@ while getopts ":p:t:" opt;do
|
|||||||
done
|
done
|
||||||
|
|
||||||
THEMEVOLUME=""
|
THEMEVOLUME=""
|
||||||
echo "Starting server on http://localhost:${PORT}"
|
|
||||||
if [[ "$THEME" ]]; then
|
if [[ "$THEME" ]]; then
|
||||||
echo "Using theme from ${THEME}"
|
echo "Using theme from ${THEME}"
|
||||||
ABSOLUTE=$(absolute $THEME)
|
ABSOLUTE=$(absolute $THEME)
|
||||||
THEMEVOLUME="-v ${ABSOLUTE}:/run/node_modules/rancher-website-theme"
|
THEMEVOLUME="-v ${ABSOLUTE}:/run/node_modules/rancher-website-theme"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker pull rancher/docs:dev
|
if [ -z "$BUILD" ]; then
|
||||||
docker run --rm -p ${PORT}:${PORT} -it -v $(pwd):/site ${THEMEVOLUME} rancher/docs:dev dev --port=${PORT}
|
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}
|
||||||
|
|||||||
Reference in New Issue
Block a user