1- def gitBranch = " master " // change to latest
1+ def gitBranch = " latest"
22def gitURL
= " [email protected] :Memphisdev/memphis-k8s.git" 33def repoUrlPrefix = " memphisos"
44import hudson.model.*
@@ -25,12 +25,13 @@ node {
2525
2626 stage(' Edit helm files' ) {
2727 sh"""
28+ sed -i -r "s/memphis-broker:[0-9].[0-9].[0-9]/memphis-broker:\$ (cat version.conf)/g" memphis/values.yaml
2829 sed -i -r "s/[0-9].[0-9].[0-9]/\$ (cat version.conf)/g" memphis/Chart.yaml
2930 sed -i -r "s/appVersion: [0-9].[0-9].[0-9]/appVersion: \$ (cat version.conf)/g" memphis/index.yaml
3031 sed -i -r "s/version: [0-9].[0-9].[0-9]/version: \$ (cat version.conf)/g" memphis/index.yaml
3132 sed -i -r "s/[0-9].[0-9].[0-9].tgz/\$ (cat version.conf).tgz/g" memphis/index.yaml
3233 """
33- }
34+ }
3435
3536 stage(' helm merge' ){
3637 dir (' charts' ){
@@ -55,18 +56,22 @@ node {
5556
5657 stage(' Checkout to version branch' ){
5758 withCredentials([sshUserPrivateKey(keyFileVariable :' check' ,credentialsId : ' main-github' )]) {
58- // sh "git reset --hard origin/master" //change to latest
5959 sh"""
6060 GIT_SSH_COMMAND='ssh -i $check ' git checkout -b \$ (cat version.conf)
6161 GIT_SSH_COMMAND='ssh -i $check ' git push --set-upstream origin \$ (cat version.conf)
6262 """
6363 }
6464 }
6565
66+ stage(' Install gh + jq' ) {
67+ sh """
68+ sudo yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
69+ sudo yum install gh -y
70+ sudo yum install jq -y
71+ """
72+ }
73+
6674 stage(' Create new release' ) {
67- sh ' sudo yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo'
68- sh ' sudo yum install gh -y'
69- sh ' sudo yum install jq -y'
7075 withCredentials([string(credentialsId : ' gh_token' , variable : ' GH_TOKEN' )]) {
7176 sh(script :""" gh release create \$ (cat version.conf) --generate-notes""" , returnStdout : true )
7277 }
0 commit comments