Skip to content

Commit

Permalink
Fix deliver stage, add git identity, increment fake chart version so …
Browse files Browse the repository at this point in the history
…there is something for codefresh to do (#2)
  • Loading branch information
RothAndrew authored Dec 4, 2020
1 parent 01641a4 commit f7078fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
16 changes: 15 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ tasks:
desc: Deliver artifact
cmds:
- task: chart-releaser:package
- task: chart-releaser:deleteAlreadyUploaded
- task: chart-releaser:upload
- task: chart-releaser:package
- task: chart-releaser:indexAndPush

deploy:
Expand All @@ -48,6 +50,10 @@ tasks:
cmds:
- rm -rf .cr-release-packages
- helm-cr package charts/*

chart-releaser:deleteAlreadyUploaded:
desc: Delete charts that have already been uploaded
cmds:
- |
git fetch --tags
for package in .cr-release-packages/*.tgz; do
Expand Down Expand Up @@ -77,10 +83,16 @@ tasks:
chart-releaser:indexAndPush:
desc: Create and push index.yaml to gh-pages branch
vars:
gitUsername: '{{ coalesce .GIT_USERNAME "<no value>" }}'
gitEmail: '{{ coalesce .GIT_EMAIL "<no value>" }}'
owner: '{{ coalesce .CR_OWNER "<no value>" }}'
gitRepo: '{{ coalesce .CR_GIT_REPO "<no value>" }}'
chartsRepo: '{{ coalesce .CR_CHARTS_REPO "<no value>" }}'
preconditions:
- sh: test "{{.gitUsername}}" != "<no value>"
msg: "GIT_USERNAME not set"
- sh: test "{{.gitEmail}}" != "<no value>"
msg: "GIT_EMAIL not set"
- sh: test "{{.owner}}" != "<no value>"
msg: "CR_OWNER not set"
- sh: test "{{.gitRepo}}" != "<no value>"
Expand All @@ -89,6 +101,8 @@ tasks:
msg: "CR_CHARTS_REPO not set"
cmds:
- |
rm -rf .cr-index \
git config user.name "{{.gitUsername}}" \
&& git config user.email "{{.gitEmail}}" \
&& rm -rf .cr-index \
&& mkdir .cr-index \
&& helm-cr index --push
2 changes: 1 addition & 1 deletion charts/bar/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0
version: 0.5.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/foo/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down

0 comments on commit f7078fb

Please sign in to comment.