This repository has been archived by the owner on Jan 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #363 from SUSE/upstream-merge
Upstream merge - RC1
- Loading branch information
Showing
119 changed files
with
2,212 additions
and
852 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#!/bin/bash | ||
|
||
# Colours | ||
CYAN="\033[96m" | ||
YELLOW="\033[93m" | ||
RED="\033[91m" | ||
RESET="\033[0m" | ||
BOLD="\033[1m" | ||
|
||
# Program Paths: | ||
PROG=$(basename ${BASH_SOURCE[0]}) | ||
PROG_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
STRATOS_DIR="$( cd "${PROG_DIR}/../.." && pwd )" | ||
CHANGELOG="${STRATOS_DIR}/CHANGELOG.md" | ||
|
||
echo -e "${CYAN}${BOLD}===================================${RESET}" | ||
echo -e "${CYAN}${BOLD}Generating Changelog from Milestone${RESET}" | ||
echo -e "${CYAN}${BOLD}===================================${RESET}" | ||
|
||
echo -e "${YELLOW}Stratos Directory: ${STRATOS_DIR}${RESET}" | ||
echo "" | ||
|
||
# Get the version number from the package.json file | ||
|
||
REPO=${1:-cloudfoundry/stratos} | ||
|
||
MILESTONE=$(cat "${STRATOS_DIR}/package.json" | jq -r .version) | ||
echo -e "${YELLOW}Current version : ${BOLD}${MILESTONE}${RESET}" | ||
|
||
# Find the last release from the Changelog | ||
CURRENT=$(cat "${STRATOS_DIR}/CHANGELOG.md" | grep -m1 '## [0-9]*.[0-9]*.[0-9]*') | ||
CURRENT="${CURRENT:3}" | ||
if [ "$CURRENT" == "$MILESTONE" ]; then | ||
CURRENT=$(cat "${STRATOS_DIR}/CHANGELOG.md" | grep -m2 '## [0-9]*.[0-9]*.[0-9]*' | tail -n1) | ||
CURRENT="${CURRENT:3}" | ||
|
||
# There is already a section for this release - so remove it | ||
echo "Removing old changelog for release ${MILESTONE}" | ||
sed -i.bak '/^# Change Log/,/^\## '"${CURRENT}"'/{//!d;};' ${CHANGELOG} | ||
fi | ||
|
||
echo -e "${YELLOW}Previous version : ${BOLD}$CURRENT${RESET}" | ||
|
||
function search() { | ||
QUERY=$1 | ||
curl -s "https://api.github.com/search/issues?q=${QUERY}" | jq -r '.items | .[] | "- \(.title) [\\#\(.number)](\(.html_url))"' | tee -a ${CHANGELOG} | ||
} | ||
|
||
function log() { | ||
echo $1 | tee -a ${CHANGELOG} | ||
} | ||
|
||
QUERY="repo:${REPO}+milestone:3.1.0+state:closed" | ||
|
||
BUGS="$QUERY+label:bug" | ||
NON_BUGS="$QUERY+-label:bug" | ||
|
||
mv ${CHANGELOG} CHANGELOG.old | ||
|
||
echo "" | ||
echo -e "${CYAN}${BOLD}Generating Change log - content for version ${MILESTONE} will be shown below" | ||
echo -e "---------------------------------------------------------------------${RESET}" | ||
|
||
echo "# Change Log" > ${CHANGELOG} | ||
log "" | ||
log "## ${MILESTONE}" | ||
log "" | ||
log "[Full Changelog](https://github.com/${REPO}/compare/${CURRENT}...${MILESTONE})" | ||
log "" | ||
log "This release contains a number of fixes and improvements:" | ||
log "" | ||
log "**Improvements:**" | ||
log "" | ||
search $NON_BUGS | ||
|
||
log "" | ||
|
||
log "**Fixes:**" | ||
log "" | ||
search $BUGS | ||
|
||
log "" | ||
|
||
tail -n +2 CHANGELOG.old >> ${CHANGELOG} | ||
rm CHANGELOG.old | ||
|
||
sed -i.bak 's/\# Change Log.*\#\# ${CURRENT}//' ${CHANGELOG} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
deploy/stratos-base-images/Dockerfile.stratos-ruby-base.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM {{BASE_IMAGE}} | ||
|
||
{{#IS_SLE}} | ||
RUN rm -f /usr/lib/zypp/plugins/services/container-suseconnect-zypp | ||
RUN zypper addrepo -G -c -p 90 '{{ZYP_REPO_BASE_GA}}' base_ga | ||
RUN zypper addrepo -G -c -p 80 '{{ZYP_REPO_BASE_UPDATE}}' base_update | ||
RUN zypper addrepo -G -c -p 70 '{{ZYP_REPO_SP_GA}}' sp_ga | ||
RUN zypper addrepo -G -c -p 60 '{{ZYP_REPO_SP_UPDATE}}' sp_update | ||
RUN zypper ref | ||
{{/IS_SLE}} | ||
|
||
RUN zypper -n ref && \ | ||
zypper -n up && \ | ||
zypper in -y which tar curl wget gzip jq && \ | ||
zypper in -y ruby && \ | ||
zypper clean -a && \ | ||
rm -f /var/log/zypper.log /var/log/zypp/history | ||
|
||
WORKDIR / | ||
USER root | ||
|
||
{{#IS_SLE}} | ||
RUN zypper rr base_ga | ||
RUN zypper rr base_update | ||
RUN zypper rr sp_ga | ||
RUN zypper rr sp_update | ||
{{/IS_SLE}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.