Skip to content

'inertia [REMOTE] [COMMAND]'#48

Merged
bobheadxi merged 8 commits into
masterfrom
rob/#44-remove-deploy
Jan 7, 2018
Merged

'inertia [REMOTE] [COMMAND]'#48
bobheadxi merged 8 commits into
masterfrom
rob/#44-remove-deploy

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Jan 7, 2018

Copy link
Copy Markdown
Member

Status: Ready for Review

Please merge #30 first

🎟️ Ticket(s): Closes #44 , Closes #34


👷 Changes

  • commands that were previously inertia deploy [REMOTE] up etc are now just inertia [REMOTE] up etc
  • inertia remote bootstrap [REMOTE] is now inertia [REMOTE] init
  • updates to various tooltips and README documentation

🔦 Testing Instructions

inertia remote add local
inertia local init
inertia local up

@bobheadxi bobheadxi added the pr: finalized needs review and final approval label Jan 7, 2018
Comment thread cmd/remote.go
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{

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am leaving this where it is for now - after v0.0.1, will likely move it anyway as part of #46

@chadlagore chadlagore left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 more best code

Comment thread README.md Outdated
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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be inertia [REMOTE] init?

Comment thread README.md

$> inertia remote bootstrap gcloud
Bootstrapping remote...
$> inertia gcloud init

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inertia [REMOTE] init

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I know.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using gcloud here is good since it's a specific example (line before is inertia remote add gcloud)

Comment thread cmd/daemon.go

func init() {
if os.Getenv("DAEMON") != "true" {
daemonCmd.Hidden = true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shows up with inertia --help - figured we probably don't want people using the daemon commands at home 😆

Comment thread cmd/deploy.go
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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later we should handle the 412 response a bit more explicitly here (I think theres a 412 on this endpoint?). Not blocking.

Comment thread cmd/deploy.go Outdated
var deployDownCmd = &cobra.Command{
Use: "down",
Short: "Bring project offline on remote",
Long: `Bring project online on remote.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

offline*

Comment thread cmd/deploy.go
addRemoteCommand(config.CurrentRemoteName, newCmd)
}

func addRemoteCommand(remoteName string, cmd *cobra.Command) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, should disable the automatic command sorting so we can order the commands our way

@bobheadxi bobheadxi Jan 7, 2018

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

;)

@bobheadxi bobheadxi merged commit 052bab0 into master Jan 7, 2018
@bobheadxi bobheadxi deleted the rob/#44-remove-deploy branch January 7, 2018 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: finalized needs review and final approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants