Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Merge downstream #4441

Merged
merged 11 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/tools/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
1 change: 1 addition & 0 deletions deploy/ci/build-aio-image-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions deploy/ci/tasks/dev-releases/create-chart-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions deploy/ci/tasks/dev-releases/create-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions deploy/common-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
Expand All @@ -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`
Expand Down Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions deploy/kubernetes/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 -------------------------------------------------------------------------------------------
#
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/console/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
icon: https://raw.githubusercontent.com/cloudfoundry/stratos/master/deploy/kubernetes/console/icon.png
21 changes: 21 additions & 0 deletions deploy/kubernetes/imagelist-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down Expand Up @@ -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}"
Expand Down
Binary file not shown.
5 changes: 0 additions & 5 deletions examples/custom-src/frontend/assets/eula.html

This file was deleted.

Binary file removed examples/custom-src/frontend/assets/login-bg.jpg
Binary file not shown.
Binary file removed examples/custom-src/frontend/assets/logo.png
Binary file not shown.
Binary file removed examples/custom-src/frontend/favicon.ico
Binary file not shown.
38 changes: 0 additions & 38 deletions examples/custom-src/frontend/loading.css

This file was deleted.

3 changes: 0 additions & 3 deletions examples/custom-src/frontend/loading.html

This file was deleted.

18 changes: 0 additions & 18 deletions examples/custom-src/frontend/sass/custom.scss

This file was deleted.

7 changes: 0 additions & 7 deletions examples/custom-src/frontend/sass/custom/acme-colors.scss

This file was deleted.

71 changes: 0 additions & 71 deletions examples/custom-src/frontend/sass/custom/acme.scss

This file was deleted.

2 changes: 0 additions & 2 deletions examples/custom-src/stratos.yaml

This file was deleted.

Loading