diff --git a/build/tools/changelog.sh b/build/tools/changelog.sh index d8d4158d26..ee7301728f 100755 --- a/build/tools/changelog.sh +++ b/build/tools/changelog.sh @@ -88,6 +88,7 @@ BREAKING_CHANGES="+label:breaking-change" mv ${CHANGELOG} CHANGELOG.old + echo "" echo -e "${CYAN}${BOLD}Generating Change log - content for version ${MILESTONE} will be shown below" echo -e "---------------------------------------------------------------------${RESET}" diff --git a/deploy/ci/build-aio-image-canary.yml b/deploy/ci/build-aio-image-canary.yml index cc19412f7e..5e64ab6bcf 100644 --- a/deploy/ci/build-aio-image-canary.yml +++ b/deploy/ci/build-aio-image-canary.yml @@ -73,6 +73,7 @@ jobs: tag: stratos/deploy/ci/tasks/build-images/canary-tag tag_as_latest: false labels_file: image-tag/image-labels + squash: true build_args_file: image-tag/ui-build-args build_args: CANARY_BUILD: true diff --git a/deploy/ci/tasks/dev-releases/create-chart-helper.sh b/deploy/ci/tasks/dev-releases/create-chart-helper.sh index a08c7e13f6..2c8b5218f1 100644 --- a/deploy/ci/tasks/dev-releases/create-chart-helper.sh +++ b/deploy/ci/tasks/dev-releases/create-chart-helper.sh @@ -81,8 +81,8 @@ patchHelmChartAppVersion() { local CHART_PATH=$1 local STRATOS_FOLDER=$2 - if [ -f "${STRATOS_FOLDER}/custom-src/stratos.yaml" ]; then - PROD_VERSION=$(cat "${STRATOS_FOLDER}/custom-src/stratos.yaml" | grep "productVersion") + if [ -f "${STRATOS_FOLDER}/stratos.yaml" ]; then + PROD_VERSION=$(cat "${STRATOS_FOLDER}/stratos.yaml" | grep "productVersion") if [ ! -z "${PROD_VERSION}" ]; then PROD_VERSION=$(echo $PROD_VERSION | grep --extended --only-matching '[0-9\.]+') if [ ! -z "${PROD_VERSION}" ]; then diff --git a/deploy/ci/tasks/dev-releases/create-chart.yml b/deploy/ci/tasks/dev-releases/create-chart.yml index 043e6be351..9cb8935fd7 100644 --- a/deploy/ci/tasks/dev-releases/create-chart.yml +++ b/deploy/ci/tasks/dev-releases/create-chart.yml @@ -38,9 +38,9 @@ run: updateHelmDependency # Run customization script if there is one - if [ -f "${STRATOS}/custom-src/deploy/kubernetes/customize-helm.sh" ]; then + if [ -f "${STRATOS}/deploy/kubernetes/custom/customize-helm.sh" ]; then echo "Applying Helm Chart customizations" - ${STRATOS}/custom-src/deploy/kubernetes/customize-helm.sh "${STRATOS}/deploy/kubernetes/console" + ${STRATOS}/deploy/kubernetes/custom/customize-helm.sh "${STRATOS}/deploy/kubernetes/console" fi # Generate imagelist diff --git a/deploy/common-build.sh b/deploy/common-build.sh index 2e8906adf4..913c159a17 100644 --- a/deploy/common-build.sh +++ b/deploy/common-build.sh @@ -43,7 +43,7 @@ function buildAndPublishImage { # Proxy support # Remove intermediate containers after a successful build -BUILD_ARGS="--rm=true --squash" +BUILD_ARGS="--rm=true" RUN_ARGS="" if [ -n "${http_proxy:-}" -o -n "${HTTP_PROXY:-}" ]; then BUILD_ARGS="${BUILD_ARGS} --build-arg http_proxy=${http_proxy:-${HTTP_PROXY}}" @@ -54,6 +54,15 @@ if [ -n "${https_proxy:-}" -o -n "${HTTPS_PROXY:-}" ]; then RUN_ARGS="${RUN_ARGS} -e https_proxy=${https_proxy:-${HTTPS_PROXY}}" fi +# Check if we can squash +CAN_SQUASH=$(docker info 2>&1 | grep "Experimental: true" -c | cat) +if [ "${CAN_SQUASH}" == "1" ]; then + BUILD_ARGS="${BUILD_ARGS} --squash" + echo "Images will be squashed" +else + echo "Images will NOT be squashed" +fi + # Use correct sed command for Mac SED="sed -r" unamestr=`uname` @@ -104,7 +113,6 @@ function cleanup { echo "-- Cleaning up ${STRATOS_PATH}" rm -rf ${STRATOS_PATH}/dist rm -rf ${STRATOS_PATH}/node_modules - rm -rf ${STRATOS_PATH}/bower_components echo echo "-- Cleaning up ${STRATOS_PATH}/deploy/containers/nginx/dist" rm -rf ${STRATOS_PATH}/deploy/containers/nginx/dist diff --git a/deploy/kubernetes/build.sh b/deploy/kubernetes/build.sh index 63cc4a0f63..f838cc3549 100755 --- a/deploy/kubernetes/build.sh +++ b/deploy/kubernetes/build.sh @@ -137,8 +137,8 @@ __DIRNAME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" STRATOS_PATH=${__DIRNAME}/../../ source "${STRATOS_PATH}/deploy/common-build.sh" -if [ -f "${STRATOS_PATH}/custom-src/deploy/kubernetes/custom-build.sh" ]; then - source "${STRATOS_PATH}/custom-src/deploy/kubernetes/custom-build.sh" +if [ -f "${STRATOS_PATH}/deploy/kubernetes/custom/custom-build.sh" ]; then + source "${STRATOS_PATH}/deploy/kubernetes/custom/custom-build.sh" HAS_CUSTOM_BUILD="true" fi @@ -169,11 +169,10 @@ function patchDockerfile { if [ "${DOCKER_REG_DEFAULTS}" == "false" ]; then sed -i.bak "s@splatform@${DOCKER_REGISTRY}/${DOCKER_ORG}@g" "${FOLDER}/${PATCHED_DOCKER_FILE}" fi - sed -i.bak "s/opensuse/${BASE_IMAGE_TAG}/g" "${FOLDER}/${PATCHED_DOCKER_FILE}" + sed -i.bak "s/leap15_1/${BASE_IMAGE_TAG}/g" "${FOLDER}/${PATCHED_DOCKER_FILE}" popd > /dev/null 2>&1 } - # # MAIN ------------------------------------------------------------------------------------------- # @@ -184,7 +183,9 @@ popd > /dev/null 2>&1 echo "Base path: ${STRATOS_PATH}" # cleanup output, intermediate artifacts -cleanup +if [ "${CHART_ONLY}" == "false" ]; then + cleanup +fi # Clean any old patched docker files left if previously errored # rm -rf ${STRATOS_PATH}/deploy/Dockerfile.*.patched @@ -237,9 +238,9 @@ rm -rf "${DEST_HELM_CHART_PATH}/**/*.orig" # Run customization script if there is one # This can do things like provide a custom __stratos.tpl file -if [ -f "${STRATOS_PATH}/custom-src/deploy/kubernetes/customize-helm.sh" ]; then +if [ -f "${STRATOS_PATH}/deploy/kubernetes/custom/customize-helm.sh" ]; then printf "${YELLOW}${BOLD}Applying Helm Chart customizations${RESET}\n" - "${STRATOS_PATH}/custom-src/deploy/kubernetes/customize-helm.sh" "${DEST_HELM_CHART_PATH}" + "${STRATOS_PATH}/deploy/kubernetes/custom/customize-helm.sh" "${DEST_HELM_CHART_PATH}" fi # Fetch subcharts diff --git a/deploy/kubernetes/console/Chart.yaml b/deploy/kubernetes/console/Chart.yaml index fcf011b8c0..22538c426e 100644 --- a/deploy/kubernetes/console/Chart.yaml +++ b/deploy/kubernetes/console/Chart.yaml @@ -5,4 +5,4 @@ version: 0.1.0 appVersion: 0.1.0 sources: - https://github.com/cloudfoundry/stratos -icon: https://raw.githubusercontent.com/cloudfoundry/stratos/master/deploy/kubernetes/icon.png \ No newline at end of file +icon: https://raw.githubusercontent.com/cloudfoundry/stratos/master/deploy/kubernetes/console/icon.png \ No newline at end of file diff --git a/deploy/kubernetes/imagelist-gen.sh b/deploy/kubernetes/imagelist-gen.sh index 77db87f409..a4bf5e5156 100755 --- a/deploy/kubernetes/imagelist-gen.sh +++ b/deploy/kubernetes/imagelist-gen.sh @@ -12,6 +12,22 @@ __DIRNAME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" printf "${BOLD}${CYAN}Generating ${YELLOW}imagelist.txt${RESET}\n" echo "" +STRATOS_FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../../ && pwd )" + +# Add any customizations +function addCustomizations() { + + if [ -f "${STRATOS_FOLDER}/deploy/kubernetes/custom/imagelist.txt" ];then + echo "Including custom imagelist contents" + cat "${STRATOS_FOLDER}/deploy/kubernetes/custom/imagelist.txt" >> ./imagelist.txt + + # Update version number + VERSION=$(grep -Po 'consoleVersion: \K(.*)' ./values.yaml) + echo "Image Version: ${VERSION}" + sed -i 's/_VERSION_/'"${VERSION}"'/g' imagelist.txt + fi +} + CHART_FOLDER=${1} @@ -41,6 +57,11 @@ if [ $? -ne 0 ]; then echo -e "${BOLD}${RED}ERROR: Failed to render Helm Chart in order to generate image list" exit 1 fi + +# Add any customizations to the image list +# Mainly used if there are unreferenced images that need to be included +addCustomizations + popd > /dev/null printf "${CYAN}" diff --git a/examples/custom-src/frontend/assets/custom/acme_logo.png b/examples/custom-src/frontend/assets/custom/acme_logo.png deleted file mode 100644 index 397545f790..0000000000 Binary files a/examples/custom-src/frontend/assets/custom/acme_logo.png and /dev/null differ diff --git a/examples/custom-src/frontend/assets/eula.html b/examples/custom-src/frontend/assets/eula.html deleted file mode 100644 index 1f2241fe1c..0000000000 --- a/examples/custom-src/frontend/assets/eula.html +++ /dev/null @@ -1,5 +0,0 @@ -
AMCE Corp End User License Agreement
- -PLEASE READ THIS AGREEMENT CAREFULLY.
- -This is an exmaple EULA.
diff --git a/examples/custom-src/frontend/assets/login-bg.jpg b/examples/custom-src/frontend/assets/login-bg.jpg deleted file mode 100644 index 2b2e8e42f7..0000000000 Binary files a/examples/custom-src/frontend/assets/login-bg.jpg and /dev/null differ diff --git a/examples/custom-src/frontend/assets/logo.png b/examples/custom-src/frontend/assets/logo.png deleted file mode 100644 index 8129763913..0000000000 Binary files a/examples/custom-src/frontend/assets/logo.png and /dev/null differ diff --git a/examples/custom-src/frontend/favicon.ico b/examples/custom-src/frontend/favicon.ico deleted file mode 100644 index 60f452c054..0000000000 Binary files a/examples/custom-src/frontend/favicon.ico and /dev/null differ diff --git a/examples/custom-src/frontend/loading.css b/examples/custom-src/frontend/loading.css deleted file mode 100644 index 9633b127db..0000000000 --- a/examples/custom-src/frontend/loading.css +++ /dev/null @@ -1,38 +0,0 @@ -.stratos-initial-load-spinner-container { - align-items: center; - background-color: #0D2C40; - display: flex; - justify-content: center; - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} - -.stratos-initial-load-spinner-logo { - position: absolute; - height: 60px; -} - -.stratos-initial-load-spinner { - animation: stratos-initial-load-animate 1s infinite linear; - box-sizing: border-box; - border: 5px solid rgba(86, 107, 121, 0.45); - border-radius: 50%; - border-top-color: #00B2E2; - display: inline-block; - height: 128px; - margin: 0 auto; - width: 128px; -} - -@keyframes stratos-initial-load-animate { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(359deg); - } -} diff --git a/examples/custom-src/frontend/loading.html b/examples/custom-src/frontend/loading.html deleted file mode 100644 index cf66894e7b..0000000000 --- a/examples/custom-src/frontend/loading.html +++ /dev/null @@ -1,3 +0,0 @@ -