Skip to content

Commit 66fa6e6

Browse files
committed
prepare release
1 parent 6cfe091 commit 66fa6e6

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ example:
22
go build -mod vendor
33
(cd example && \
44
INPUT_CREDS=.google_application_credentials.json \
5-
GITHUB_RUN_NUMBER=170 \
5+
GITHUB_RUN_NUMBER=201 \
66
GITHUB_SHA=13e82dd30df4e87118faa98712a5aebb0ab05c45 \
77
../gce-deploy-action)
88

RELEASE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Release instructions
2+
3+
1. Update `GCE_DEPLOY_VERSION` in [action.yml](action.yml)
4+
2. Push latest to master branch
5+
3. Tag with `v1.x.x` and `v1`
6+
4. Create release in Github
7+

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ runs:
2121
shell: bash
2222
run: |
2323
cd /tmp
24-
export GCE_DEPLOY_VERSION=3.0.1
24+
export GCE_DEPLOY_VERSION=4.0.0
2525
wget --quiet https://github.com/mattes/gce-deploy-action/releases/download/v${GCE_DEPLOY_VERSION}/gce-deploy-action.linux.amd64
2626
sudo mv gce-deploy-action.linux.amd64 /usr/local/bin/gce-deploy-action
2727
sudo chmod +x /usr/local/bin/gce-deploy-action

deploy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func Run(githubActionConfig *GithubActionConfig, config *Config, deploy Deploy)
6565
maxUnavailable += "%"
6666
}
6767

68-
Infof("%v: Started rolling deploy for instance group '%v/%v' with Update Type: %v, Minimal Action: %v, Replacement Method: %v, Min Ready: %vsec, Max Surge: %v, Max Unavailable: %v",
68+
Infof("%v: Started rolling deploy for instance group '%v/%v' with UpdateType:%v, MinimalAction:%v, ReplacementMethod:%v, MinReady:%vsec, MaxSurge:%v, MaxUnavailable:%v",
6969
deploy.Name, deploy.Project, deploy.InstanceGroup, deploy.UpdatePolicy.Type, deploy.UpdatePolicy.MinimalAction, deploy.UpdatePolicy.ReplacementMethod, deploy.UpdatePolicy.minReadySec, maxSurge, maxUnavailable)
7070

7171
// start rolling update via instance group manager

google.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func StartRollingUpdate(c *computeBeta.Service, d Deploy, instanceTemplateURL st
154154
// TODO consider making the following check a configuration flag
155155
latestVersion := findLatestInstanceGroupManagerVersion(ig.Versions)
156156
if latestVersion != "" && !VersionLessThan(latestVersion, d.InstanceTemplate) {
157-
return fmt.Errorf("update instance group: instance template '%v' is too old, because '%v' is the latest instance template.", d.InstanceTemplate, latestVersion)
157+
return fmt.Errorf("update instance group: instance template '%v' is too old, the newer instance template '%v' is already deployed.", d.InstanceTemplate, latestVersion)
158158
}
159159

160160
ig.InstanceTemplate = "" // make sure it's empty
@@ -175,8 +175,6 @@ func StartRollingUpdate(c *computeBeta.Service, d Deploy, instanceTemplateURL st
175175
ig.UpdatePolicy.MinimalAction = d.UpdatePolicy.MinimalAction
176176
ig.UpdatePolicy.ReplacementMethod = d.UpdatePolicy.ReplacementMethod
177177

178-
ig.UpdatePolicy.NullFields = []string{"InstanceRedistributionType"}
179-
180178
ig.UpdatePolicy.MinReadySec = int64(d.UpdatePolicy.minReadySec)
181179
ig.UpdatePolicy.ForceSendFields = []string{"MinReadySec"}
182180

0 commit comments

Comments
 (0)