-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically sync chart #552
Conversation
8fae076
to
2013cb7
Compare
script/chart_sync.sh
Outdated
|
||
set -e | ||
|
||
CHARTS_REPO="andresmgot/charts-1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guessing this needs to change to bitnami/charts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
script/chart_sync.sh
Outdated
|
||
changedVersion() { | ||
local currentVersion=$(cat "${KUBEAPPS_CHART_DIR}/Chart.yaml" | grep "version:") | ||
local externalVersion=$(curl -s https://raw.githubusercontent.com/${CHARTS_REPO}/master/${CHART_REPO_PATH}/Chart.yaml | grep "version:") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we use git describe
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean git describe
for the external version? There are no tags there and in any case there are no tags for the version
of the chart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, I misread this line, can we use https://charts.bitnami.com/bitnami/index.yaml instead?
script/chart_sync.sh
Outdated
cp -R "${KUBEAPPS_CHART_DIR}" "${targetRepo}/${CHART_REPO_PATH}" | ||
# DANGER: This replaces any tag marked as latest | ||
sed -i.bk 's/tag: latest/tag: '"${targetTag}"'/g' "${targetRepo}/${CHART_REPO_PATH}/values.yaml" | ||
rm "${targetRepo}/${CHART_REPO_PATH}/values.yaml.bk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also set appVersion in the Chart.yaml? I'm thinking that in this repo we set Chart.yaml to "latest" or "UNRELEASED" or something. Otherwise, we'll have to bump that also when updating the chart version here. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a slightly difference (at least right now) between the appVersion in the Chart.yaml
and the github tag: v1.0.0.alpha.6
vs v1.0.0-alpha.6
(note the dash). I don't know if that is intentional but that prevents from auto updating that field here if we want to follow the same notation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's a mistake - I didn't even realise. The appVersion should be the same as the tag.
script/chart_sync.sh
Outdated
return 1 | ||
fi | ||
git add --all . | ||
git commit -m "Update Kubeapps chart" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should set this to "kubeapps: bump chart version to $VERSION
" to match the bitnami-bot commit messages: https://github.com/bitnami/charts/commits/master
script/release_utils.sh
Outdated
function commit_list { | ||
local tag=${1:?} | ||
local repo_domain=${2:?} | ||
local repo_name=${3:?} | ||
git fetch --tags | ||
local previous_tag=`git describe --tags $(git rev-list --tags --max-count=1)` | ||
local previous_tag=$(getLatestTag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is getLatestTag the previous tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mm, you are right. I thought that when the current commit is a tag this would return the previous one but I just checked in the latest release of circleCI and it's returning the current tag (so the comparison is empty). Did this work when you did the release of v1.0.0-alpha.6? I see you discarded the draft and you created the release notes on your own, did the draft include the list of commits of the release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems it doesn't work. I'll send a PR for fixing that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It didn't, I forgot to create an issue for it, sorry - thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm but let's set the appVersion in Chart.yaml too
0e7a4e1
to
f128968
Compare
Fixes #414
Automatically release a chart in the repository
bitnami/charts
for Kubeapps. The process for updating a version is:chart/kubeapps/Chart.yaml
. Once that change is inmaster
CircleCI will update the status of thebitnami/charts
repo with the files in this repository.IMPORTANT: The script in 2. will automatically change the references to
tag: latest
in the filechart/kubeapps/values.yaml
with the latest tag available (normally the tag released in 1.).Update example: andresmgot/charts-1@d3c6918