'inertia [REMOTE] [COMMAND]'#48
Conversation
| Short: "Bootstrap the VPS for continuous deployment", | ||
| Long: `Bootstrap the VPS for continuous deployment. | ||
| // deployInitCmd represents the inertia [REMOTE] init command | ||
| var deployInitCmd = &cobra.Command{ |
There was a problem hiding this comment.
I am leaving this where it is for now - after v0.0.1, will likely move it anyway as part of #46
6d35a3d to
4d165f9
Compare
| continuously deployed. | ||
|
|
||
| The output of `inertia bootstrap [REMOTE]` has given you two important pieces of information. | ||
| The output of `inertia [REMOTE] bootstrap` has given you two important pieces of information: |
There was a problem hiding this comment.
Should be inertia [REMOTE] init?
|
|
||
| $> inertia remote bootstrap gcloud | ||
| Bootstrapping remote... | ||
| $> inertia gcloud init |
There was a problem hiding this comment.
I think using gcloud here is good since it's a specific example (line before is inertia remote add gcloud)
|
|
||
| func init() { | ||
| if os.Getenv("DAEMON") != "true" { | ||
| daemonCmd.Hidden = true |
There was a problem hiding this comment.
It shows up with inertia --help - figured we probably don't want people using the daemon commands at home 😆
| fmt.Printf("(Status code %d) Project up\n", resp.StatusCode) | ||
| case http.StatusForbidden: | ||
| fmt.Printf("(Status code %d) Bad auth: %s\n", resp.StatusCode, body) | ||
| default: |
There was a problem hiding this comment.
Later we should handle the 412 response a bit more explicitly here (I think theres a 412 on this endpoint?). Not blocking.
| var deployDownCmd = &cobra.Command{ | ||
| Use: "down", | ||
| Short: "Bring project offline on remote", | ||
| Long: `Bring project online on remote. |
| addRemoteCommand(config.CurrentRemoteName, newCmd) | ||
| } | ||
|
|
||
| func addRemoteCommand(remoteName string, cmd *cobra.Command) { |
There was a problem hiding this comment.
Super cool!
▶ ./inertia gcloud --help
Start or stop continuous deployment to the remote VPS instance specified.
Run 'inertia remote status' beforehand to ensure your daemon is running.
Requires:
1. A deploy key to be registered for the daemon with your GitHub repository.
2. A webhook url to registered for the daemon with your GitHub repository.
Run 'inertia [REMOTE] init' to collect these.
Usage:
inertia gcloud [command]
Available Commands:
down Bring project offline on remote
init Initialize the VPS for continuous deployment
reset Reset the project on your remote
status Print the status of deployment on remote
up Bring project online on remote
Flags:
-h, --help help for gcloud
Use "inertia gcloud [command] --help" for more information about a command.There was a problem hiding this comment.
Hm, should disable the automatic command sorting so we can order the commands our way
⌛ Status: Ready for Review
Please merge #30 first
🎟️ Ticket(s): Closes #44 , Closes #34
👷 Changes
inertia deploy [REMOTE] upetc are now justinertia [REMOTE] upetcinertia remote bootstrap [REMOTE]is nowinertia [REMOTE] init🔦 Testing Instructions