File tree Expand file tree Collapse file tree 5 files changed +63
-0
lines changed Expand file tree Collapse file tree 5 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 12
12
- job-chart
13
13
" aes-chart-publish " :
14
14
executor : aes-linux
15
+ environment :
16
+ PUBLISH_GIT_RELEASE : " true"
15
17
steps :
16
18
- job-chart-publish
17
19
" aes-manifest-publish " :
Original file line number Diff line number Diff line change 13
13
14
14
" aes-chart-publish " :
15
15
executor : aes-linux
16
+ environment :
17
+ PUBLISH_GIT_RELEASE : " true"
16
18
steps :
17
19
- job-chart-publish
18
20
Original file line number Diff line number Diff line change
1
+ ## :tada: Ambassador Edge Stack Chart $CHART_VERSION :tada:
2
+
3
+ Upgrade Edge Stack - https://www.getambassador.io/reference/upgrading#helm.html
4
+ View changelog - https://github.com/emissary-ingress/edge-stack/blob/$CHART_VERSION/charts/edge-stack/CHANGELOG.md
5
+
6
+ ---
7
+
8
+
Original file line number Diff line number Diff line change
1
+ Ambassador Edge Stack Chart $CHART_VERSION
Original file line number Diff line number Diff line change 75
75
info " Cleaning up..."
76
76
echo
77
77
rm ${chart_dir} /tmp.yaml " $CHART_PACKAGE "
78
+
79
+ if [[ $thisversion =~ ^[0-9]+\. [0-9]+\. [0-9]+ (-ea)? $ ]] && [[ -n " ${PUBLISH_GIT_RELEASE} " ]]; then
80
+ if [[ -z " ${CIRCLE_SHA1} " ]] ; then
81
+ echo " CIRCLE_SHA1 not set"
82
+ exit 1
83
+ fi
84
+ if [[ -z " ${GH_RELEASE_TOKEN} " ]] ; then
85
+ echo " GH_RELEASE_TOKEN not set"
86
+ exit 1
87
+ fi
88
+ tag=" chart-v${thisversion} "
89
+ export CHART_VERSION=${thisversion}
90
+ title=` envsubst < ${chart_dir} /RELEASE_TITLE.tpl`
91
+ repo_full_name=" datawire/edge-stack"
92
+ token=" ${GH_RELEASE_TOKEN} "
93
+ description=` envsubst < ${chart_dir} /RELEASE.tpl | awk ' {printf "%s\\\n", $0}' `
94
+ in_changelog=false
95
+ while IFS= read -r line ; do
96
+ if ${in_changelog} ; then
97
+ if [[ " ${line} " =~ " ## v" ]] ; then
98
+ break
99
+ fi
100
+ if [[ -n " ${line} " ]] ; then
101
+ description=" ${description} \\ n${line} "
102
+ fi
103
+ fi
104
+ if [[ " ${line} " =~ " ## v${chart_version} " ]] ; then
105
+ in_changelog=true
106
+ fi
107
+
108
+ done < ${chart_dir} /CHANGELOG.md
109
+
110
+ generate_post_data ()
111
+ {
112
+ cat << EOF
113
+ {
114
+ "tag_name": "$tag ",
115
+ "name": "$title ",
116
+ "body": "${description} ",
117
+ "draft": false,
118
+ "prerelease": false,
119
+ "target_commitish": "${CIRCLE_SHA1} "
120
+ }
121
+ EOF
122
+ }
123
+ curl --fail -H " Authorization: token ${token} " --data " $( generate_post_data) " " https://api.github.com/repos/$repo_full_name /releases"
124
+ fi
125
+
126
+ exit 0
127
+
You can’t perform that action at this time.
0 commit comments