My deployment platform is a shell script
1–10 of 141 posts
Re: My deployment platform is a shell script
#2Re: My deployment platform is a shell script
#3Shell scripts written in NetBSD sh/Debian ash will work for as long as I live.
Re: My deployment platform is a shell script
#4Re: My deployment platform is a shell script
#5I wouldn't use it for serious stuff, but it's been working great for my random personal projects (biggest gap is if something crashes it'll stay crashed until manual intervention currently)
Re: My deployment platform is a shell script
#6pushthis="rsync -avzh --del ~/path.local/ somedude@path.online:path.online"
Re: My deployment platform is a shell script
#7Re: My deployment platform is a shell script
#8Can someone ELI5 what he said in the blog post please? What does the script do?
If the current code is behind (there are new commits), it merges them. If it fails, it stops.
If not, it runs `go build`. If it fails, it stops.
If not, it moves the binary to the right location and restarts the service.
Re: My deployment platform is a shell script
#9Example: this interprets the output of 'ls'. Reliability is dependent on good quoting/never introducing a project with spaces
Ansible is a nice middle ground, personally. I write the state that differs, use a library of scripting.
Re: My deployment platform is a shell script
#10Not to deride this (too much), but the 'robustness' of deployments with shell scripts is tempting bait. Things are until they aren't, 'nobody rides for free' - decide what you're willing to pay. Example: this interprets the output of 'ls' . Reliability is dependent on good quoting/never introducing a project with spaces Ansible is a nice middle ground, personally. I write the state that differs, use a library of scri…
It also doesn't fail immediately if many of the commands fail (instead blindly moves on to the next statement). Consider using bash and these options: https://github.com/kvz/bash3boilerplate/blob/main/main.sh#L1... for most scripts.