From bf999a82b0d65f9eb1792fd07f921b6d36be8b94 Mon Sep 17 00:00:00 2001 From: Shaun Duncan Date: Thu, 20 Feb 2014 20:55:56 -0500 Subject: [PATCH 1/9] Fix form for full width of column --- pkg/template/pages/admin_users_add.html | 2 +- pkg/template/pages/members_add.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/template/pages/admin_users_add.html b/pkg/template/pages/admin_users_add.html index f0d2ee750..4c7c50e37 100644 --- a/pkg/template/pages/admin_users_add.html +++ b/pkg/template/pages/admin_users_add.html @@ -22,7 +22,7 @@
Users will be granted access by Email invitation.
-
+
diff --git a/pkg/template/pages/members_add.html b/pkg/template/pages/members_add.html index 2d4f0ea1c..10d613848 100644 --- a/pkg/template/pages/members_add.html +++ b/pkg/template/pages/members_add.html @@ -34,7 +34,7 @@
Invite a collaborator to join your Team.
-
+
From 3c25a4a00a32c7f58f40dadb1776b7c9f76648dd Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 21 Feb 2014 13:26:50 -0700 Subject: [PATCH 2/9] fixed issue updating team member roles --- pkg/database/members.go | 2 +- pkg/handler/admin.go | 9 +++++++-- pkg/handler/auth.go | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pkg/database/members.go b/pkg/database/members.go index c6d6ebff3..d621f1508 100644 --- a/pkg/database/members.go +++ b/pkg/database/members.go @@ -33,7 +33,7 @@ WHERE user_id = ? AND team_id = ? // SQL Queries to retrieve a member's role by id and user. const roleFindStmt = ` -SELECT role FROM members +SELECT id, team_id, user_id, role FROM members WHERE user_id = ? AND team_id = ? ` diff --git a/pkg/handler/admin.go b/pkg/handler/admin.go index d7840c7fb..ff21090f3 100644 --- a/pkg/handler/admin.go +++ b/pkg/handler/admin.go @@ -179,6 +179,11 @@ func AdminSettingsUpdate(w http.ResponseWriter, r *http.Request, u *User) error settings.OpenInvitations = (r.FormValue("OpenInvitations") == "on") + // validate user input + if err := settings.Validate(); err != nil { + return RenderError(w, err, http.StatusBadRequest) + } + // persist changes if err := database.SaveSettings(settings); err != nil { return RenderError(w, err, http.StatusBadRequest) @@ -245,8 +250,8 @@ func InstallPost(w http.ResponseWriter, r *http.Request) error { settings := Settings{} settings.Domain = r.FormValue("Domain") settings.Scheme = r.FormValue("Scheme") - settings.GitHubApiUrl = "https://api.github.com"; - settings.GitHubDomain = "github.com"; + settings.GitHubApiUrl = "https://api.github.com" + settings.GitHubDomain = "github.com" database.SaveSettings(&settings) // add the user to the session object diff --git a/pkg/handler/auth.go b/pkg/handler/auth.go index 7e91787ee..77166b55a 100644 --- a/pkg/handler/auth.go +++ b/pkg/handler/auth.go @@ -1,6 +1,7 @@ package handler import ( + "log" "net/http" "github.com/drone/drone/pkg/database" @@ -67,6 +68,7 @@ func LinkGithub(w http.ResponseWriter, r *http.Request, u *User) error { // exchange code for an auth token token, err := oauth.GrantToken(code) if err != nil { + log.Println("Error granting GitHub authorization token") return err } @@ -77,6 +79,7 @@ func LinkGithub(w http.ResponseWriter, r *http.Request, u *User) error { // get the user information githubUser, err := client.Users.Current() if err != nil { + log.Println("Error retrieving currently authenticated GitHub user") return err } @@ -84,6 +87,7 @@ func LinkGithub(w http.ResponseWriter, r *http.Request, u *User) error { u.GithubToken = token.AccessToken u.GithubLogin = githubUser.Login if err := database.SaveUser(u); err != nil { + log.Println("Error persisting user's GitHub auth token to the database") return err } From 6410bdbe9d51423ee7f2e9f1437a1242fa77114a Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 21 Feb 2014 15:25:05 -0700 Subject: [PATCH 3/9] added validation for settings --- pkg/handler/commits.go | 4 ++-- pkg/model/settings.go | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pkg/handler/commits.go b/pkg/handler/commits.go index 5ac30cf11..15f82bc87 100644 --- a/pkg/handler/commits.go +++ b/pkg/handler/commits.go @@ -48,8 +48,8 @@ func CommitShow(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) err // generate a token to connect with the websocket // handler and stream output, if the build is running. - data.Token = channel.CreateStream(fmt.Sprintf( - "%s/commit/%s/builds/%s", repo.Slug, commit.Hash, builds[0].Slug)) + data.Token = channel.Token(fmt.Sprintf( + "%s/%s/%s/commit/%s/builds/%s", repo.Host, repo.Owner, repo.Name, commit.Hash, builds[0].Slug)) // render the repository template. return RenderTemplate(w, "repo_commit.html", &data) diff --git a/pkg/model/settings.go b/pkg/model/settings.go index 3112d1d4b..e794fbd9e 100644 --- a/pkg/model/settings.go +++ b/pkg/model/settings.go @@ -1,7 +1,13 @@ package model import ( + "errors" "net/url" + "strings" +) + +var ( + ErrInvalidGitHubTrailingSlash = errors.New("GitHub URL should not have a trailing slash") ) type Settings struct { @@ -38,3 +44,13 @@ func (s *Settings) URL() *url.URL { Scheme: s.Scheme, Host: s.Domain} } + +// Validate verifies all required fields are correctly populated. +func (s *Settings) Validate() error { + switch { + case strings.HasSuffix(s.GitHubApiUrl, "/"): + return ErrInvalidGitHubTrailingSlash + default: + return nil + } +} From 25749802ac57346b4bac8d750e1dcbc5f29c6a36 Mon Sep 17 00:00:00 2001 From: Jordan Evans Date: Fri, 21 Feb 2014 16:10:04 -0800 Subject: [PATCH 4/9] add irc notify plugin It is based on github.com/fluffle/goirc --- Makefile | 1 + pkg/plugin/notify/irc.go | 79 +++++++++++++++++++++++++++++++ pkg/plugin/notify/notification.go | 6 +++ 3 files changed, 86 insertions(+) diff --git a/Makefile b/Makefile index 4be0fb074..977bc46e5 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ deps: go get github.com/dchest/authcookie go get github.com/dchest/passwordreset go get github.com/dchest/uniuri + go get github.com/fluffle/goirc #go get github.com/dotcloud/docker/archive #go get github.com/dotcloud/docker/utils #go get github.com/dotcloud/docker/pkg/term diff --git a/pkg/plugin/notify/irc.go b/pkg/plugin/notify/irc.go index a3131f139..a98104252 100644 --- a/pkg/plugin/notify/irc.go +++ b/pkg/plugin/notify/irc.go @@ -1 +1,80 @@ package notify + +import ( + "fmt" + + irc "github.com/fluffle/goirc/client" +) + +const ( + ircStartedMessage = "Building: %s, commit %s, author %s" + ircSuccessMessage = "Success: %s, commit %s, author %s" + ircFailureMessage = "Failed: %s, commit %s, author %s" +) + +type IRC struct { + Channel string `yaml:"channel,omitempty"` + Nick string `yaml:"nick,omitempty"` + Server string `yaml:"server,omitempty"` + Started bool `yaml:"on_started,omitempty"` + Success bool `yaml:"on_success,omitempty"` + Failure bool `yaml:"on_failure,omitempty"` + SSL bool `yaml:"ssl,omitempty"` + ClientStarted bool + Client *irc.Conn +} + +func (i *IRC) Connect() { + c := irc.SimpleClient(i.Nick) + c.SSL = i.SSL + connected := make(chan bool) + c.AddHandler(irc.CONNECTED, + func(conn *irc.Conn, line *irc.Line) { + conn.Join(i.Channel) + connected <- true}) + c.Connect(i.Server) + <-connected + i.Client = c + i.ClientStarted = true +} + +func (i *IRC) Send(context *Context) error { + + if !i.ClientStarted { + i.Connect() + } + + switch { + case context.Commit.Status == "Started" && i.Started: + return i.sendStarted(context) + case context.Commit.Status == "Success" && i.Success: + return i.sendSuccess(context) + case context.Commit.Status == "Failure" && i.Failure: + return i.sendFailure(context) + } + return nil +} + +func (i *IRC) sendStarted(context *Context) error { + msg := fmt.Sprintf(ircStartedMessage, context.Repo.Name, context.Commit.HashShort(), context.Commit.Author) + i.send(i.Channel, msg) + return nil +} + +func (i *IRC) sendFailure(context *Context) error { + msg := fmt.Sprintf(ircFailureMessage, context.Repo.Name, context.Commit.HashShort(), context.Commit.Author) + i.send(i.Channel, msg) + return nil +} + +func (i *IRC) sendSuccess(context *Context) error { + msg := fmt.Sprintf(ircSuccessMessage, context.Repo.Name, context.Commit.HashShort(), context.Commit.Author) + i.send(i.Channel, msg) + return nil +} + + +func (i *IRC) send(channel string, message string) error { + i.Client.Notice(channel, message) + return nil +} diff --git a/pkg/plugin/notify/notification.go b/pkg/plugin/notify/notification.go index a4c6feabf..2083d0183 100644 --- a/pkg/plugin/notify/notification.go +++ b/pkg/plugin/notify/notification.go @@ -31,6 +31,7 @@ type Notification struct { Email *Email `yaml:"email,omitempty"` Webhook *Webhook `yaml:"webhook,omitempty"` Hipchat *Hipchat `yaml:"hipchat,omitempty"` + Irc *IRC `yaml:"irc,omitempty"` } func (n *Notification) Send(context *Context) error { @@ -49,5 +50,10 @@ func (n *Notification) Send(context *Context) error { n.Hipchat.Send(context) } + // send irc notifications + if n.Irc != nil { + n.Irc.Send(context) + } + return nil } From 20bf390dc259265e23f36df897e09754e985c92e Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Sun, 23 Feb 2014 20:19:00 +0700 Subject: [PATCH 5/9] Enable deployment via ssh --- Makefile | 1 + pkg/handler/repos.go | 2 +- pkg/plugin/deploy/deployment.go | 4 + pkg/plugin/deploy/ssh.go | 95 ++++++++++++++++++++++++ pkg/plugin/deploy/ssh_test.go | 125 ++++++++++++++++++++++++++++++++ 5 files changed, 226 insertions(+), 1 deletion(-) create mode 100644 pkg/plugin/deploy/ssh_test.go diff --git a/Makefile b/Makefile index 977bc46e5..bbfb55413 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,7 @@ test: go test -v github.com/drone/drone/pkg/database/testing go test -v github.com/drone/drone/pkg/mail go test -v github.com/drone/drone/pkg/model + go test -v github.com/drone/drone/pkg/plugin/deploy go test -v github.com/drone/drone/pkg/queue install: diff --git a/pkg/handler/repos.go b/pkg/handler/repos.go index fe3336c01..8d728814c 100644 --- a/pkg/handler/repos.go +++ b/pkg/handler/repos.go @@ -125,7 +125,7 @@ func RepoCreateGithub(w http.ResponseWriter, r *http.Request, u *User) error { // create the github key, or update if one already exists _, err := client.RepoKeys.CreateUpdate(owner, name, repo.PublicKey, keyName) if err != nil { - return fmt.Errorf("Unable to add Private Key to your GitHub repository") + return fmt.Errorf("Unable to add Public Key to your GitHub repository") } } else { diff --git a/pkg/plugin/deploy/deployment.go b/pkg/plugin/deploy/deployment.go index 0181586c4..e45b3a94d 100644 --- a/pkg/plugin/deploy/deployment.go +++ b/pkg/plugin/deploy/deployment.go @@ -16,6 +16,7 @@ type Deploy struct { Heroku *Heroku `yaml:"heroku,omitempty"` Nodejitsu *Nodejitsu `yaml:"nodejitsu,omitempty"` Openshift *Openshift `yaml:"openshift,omitempty"` + SSH *SSH `yaml:"ssh,omitempty"` } func (d *Deploy) Write(f *buildfile.Buildfile) { @@ -43,4 +44,7 @@ func (d *Deploy) Write(f *buildfile.Buildfile) { if d.Openshift != nil { d.Openshift.Write(f) } + if d.SSH != nil { + d.SSH.Write(f) + } } diff --git a/pkg/plugin/deploy/ssh.go b/pkg/plugin/deploy/ssh.go index b2b65d9ca..51b1da717 100644 --- a/pkg/plugin/deploy/ssh.go +++ b/pkg/plugin/deploy/ssh.go @@ -1 +1,96 @@ package deploy + +import ( + "fmt" + "strconv" + "strings" + + "github.com/drone/drone/pkg/build/buildfile" +) + +// SSH struct holds configuration data for deployment +// via ssh, deployment done by scp-ing file(s) listed +// in artifacts to the target host, and then run cmd +// remotely. +// It is assumed that the target host already +// add this repo public key in the host's `authorized_hosts` +// file. And the private key is already copied to `.ssh/id_rsa` +// inside the build container. No further check will be done. +type SSH struct { + + // Target is the deployment host in this format + // user@hostname:/full/path + // + // PORT may be omitted if its default to port 22. + Target string `yaml:"target,omitempty"` + + // Artifacts is a list of files/dirs to be deployed + // to the target host. If artifacts list more than one file + // it will be compressed into a single tar.gz file. + // if artifacts contain: + // - GITARCHIVE + // + // other file listed in artifacts will be ignored, instead, we will + // create git archive from the current revision and deploy that file + // alone. + // If you need to deploy the git archive along with some other files, + // please use build script to create the git archive, and then list + // the archive name here with the other files. + Artifacts []string `yaml:"artifacts,omitempty"` + + // Cmd is a single command executed at target host after the artifacts + // is deployed. + Cmd string `yaml:"cmd,omitempty"` +} + +// Write down the buildfile +func (s *SSH) Write(f *buildfile.Buildfile) { + host := strings.SplitN(s.Target, " ", 2) + if len(host) == 1 { + host = append(host, "22") + } + if _, err := strconv.Atoi(host[1]); err != nil { + host[1] = "22" + } + + // Is artifact created? + artifact := false + + for _, a := range s.Artifacts { + if a == "GITARCHIVE" { + artifact = createGitArchive(f) + break + } + } + + if len(s.Artifacts) > 1 && !artifact { + artifact = compress(f, s.Artifacts) + } else if len(s.Artifacts) == 1 { + f.WriteCmdSilent(fmt.Sprintf("ARTIFACT=%s", s.Artifacts[0])) + artifact = true + } + + if artifact { + scpCmd := "scp -o StrictHostKeyChecking=no -P %s ${ARTIFACT} %s" + f.WriteCmd(fmt.Sprintf(scpCmd, host[1], host[0])) + } + + if len(s.Cmd) > 0 { + sshCmd := "ssh -o StrictHostKeyChecking=no -p %s %s %s" + f.WriteCmd(fmt.Sprintf(sshCmd, host[1], strings.SplitN(host[0], ":", 2)[0], s.Cmd)) + } +} + +func createGitArchive(f *buildfile.Buildfile) bool { + f.WriteCmdSilent("COMMIT=$(git rev-parse HEAD)") + f.WriteCmdSilent("ARTIFACT=${PWD##*/}-${COMMIT}.tar.gz") + f.WriteCmdSilent("git archive --format=tar.gz --prefix=${PWD##*/}/ ${COMMIT} > ${ARTIFACT}") + return true +} + +func compress(f *buildfile.Buildfile, files []string) bool { + cmd := "tar -cf ${ARTIFACT} %s" + f.WriteCmdSilent("ARTIFACT=${PWD##*/}.tar.gz") + f.WriteCmdSilent(fmt.Sprintf(cmd, strings.Join(files, " "))) + return true +} diff --git a/pkg/plugin/deploy/ssh_test.go b/pkg/plugin/deploy/ssh_test.go new file mode 100644 index 000000000..e3f4fc185 --- /dev/null +++ b/pkg/plugin/deploy/ssh_test.go @@ -0,0 +1,125 @@ +package deploy + +import ( + "strings" + "testing" + + "github.com/drone/drone/pkg/build/buildfile" + + "launchpad.net/goyaml" +) + +// emulate Build struct +type build struct { + Deploy *Deploy `yaml:"deploy,omitempty"` +} + +var sampleYml = ` +deploy: + ssh: + target: user@test.example.com + cmd: /opt/bin/redeploy.sh +` + +var sampleYml1 = ` +deploy: + ssh: + target: user@test.example.com:/srv/app/location 2212 + artifacts: + - build.result + cmd: /opt/bin/redeploy.sh +` + +var sampleYml2 = ` +deploy: + ssh: + target: user@test.example.com:/srv/app/location 2212 + artifacts: + - build.result + - config/file + cmd: /opt/bin/redeploy.sh +` + +var sampleYml3 = ` +deploy: + ssh: + target: user@test.example.com:/srv/app/location 2212 + artifacts: + - GITARCHIVE + cmd: /opt/bin/redeploy.sh +` + +func setUp(input string) (string, error) { + var buildStruct build + err := goyaml.Unmarshal([]byte(input), &buildStruct) + if err != nil { + return "", err + } + bf := buildfile.New() + buildStruct.Deploy.Write(bf) + return bf.String(), err +} + +func TestSSHNoArtifact(t *testing.T) { + bscr, err := setUp(sampleYml) + if err != nil { + t.Fatalf("Can't unmarshal deploy script: %s", err) + } + + if strings.Contains(bscr, `scp`) { + t.Error("Expect script not to contains scp command") + } + + if !strings.Contains(bscr, "ssh -o StrictHostKeyChecking=no -p 22 user@test.example.com /opt/bin/redeploy.sh") { + t.Error("Expect script to contains ssh command") + } +} + +func TestSSHOneArtifact(t *testing.T) { + bscr, err := setUp(sampleYml1) + if err != nil { + t.Fatalf("Can't unmarshal deploy script: %s", err) + } + + if !strings.Contains(bscr, "ARTIFACT=build.result") { + t.Errorf("Expect script to contains artifact") + } + + if !strings.Contains(bscr, "scp -o StrictHostKeyChecking=no -P 2212 ${ARTIFACT} user@test.example.com:/srv/app/location") { + t.Errorf("Expect script to contains scp command, got:\n%s", bscr) + } +} + +func TestSSHMultiArtifact(t *testing.T) { + bscr, err := setUp(sampleYml2) + if err != nil { + t.Fatalf("Can't unmarshal deploy script: %s", err) + } + + if !strings.Contains(bscr, "ARTIFACT=${PWD##*/}.tar.gz") { + t.Errorf("Expect script to contains artifact") + } + + if !strings.Contains(bscr, "tar -cf ${ARTIFACT} build.result config/file") { + t.Errorf("Expect script to contains tar command. got:\n", bscr) + } +} + +func TestSSHGitArchive(t *testing.T) { + bscr, err := setUp(sampleYml3) + if err != nil { + t.Fatalf("Can't unmarshal deploy script: %s", err) + } + + if !strings.Contains(bscr, "COMMIT=$(git rev-parse HEAD)") { + t.Errorf("Expect script to contains commit ref") + } + + if !strings.Contains(bscr, "ARTIFACT=${PWD##*/}-${COMMIT}.tar.gz") { + t.Errorf("Expect script to contains artifact") + } + + if !strings.Contains(bscr, "git archive --format=tar.gz --prefix=${PWD##*/}/ ${COMMIT} > ${ARTIFACT}") { + t.Errorf("Expect script to run git archive") + } +} From 3920fd92fed4966284b8cccb112e73a4bde350cb Mon Sep 17 00:00:00 2001 From: Matt Hernandez Date: Sun, 23 Feb 2014 12:02:53 -0500 Subject: [PATCH 6/9] Added Modulus deployment. Uses the configuration options of: Token (the user's Modulus API token) and project (the project to deploy to). --- pkg/plugin/deploy/modulus.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pkg/plugin/deploy/modulus.go diff --git a/pkg/plugin/deploy/modulus.go b/pkg/plugin/deploy/modulus.go new file mode 100644 index 000000000..192fccef8 --- /dev/null +++ b/pkg/plugin/deploy/modulus.go @@ -0,0 +1,20 @@ +package deploy + +import ( + "fmt" + "github.com/drone/drone/pkg/build/buildfile" +) + +type Modulus struct { + Project string `yaml:"project,omitempty"` + Token string `yaml:"token,omitempty"` +} + +func (m *Modulus) Write(f *buildfile.Buildfile) { + f.writeEnv("MODULUS_TOKEN", m.Token) + + // Install the Modulus command line interface then deploy the configured + // project. + f.WriteCmdSilent("npm install -g modulus") + f.WriteCmd(fmt.Sprintf("modulus deploy -p '%s'", m.App)) +} From 77e2837ff0b9904e8cef26609f0fbc1ab6cb268e Mon Sep 17 00:00:00 2001 From: Matt Hernandez Date: Sun, 23 Feb 2014 12:08:44 -0500 Subject: [PATCH 7/9] Add Modulus to deployment class. Allow the Modulus deployment type to be used. --- pkg/plugin/deploy/deployment.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/plugin/deploy/deployment.go b/pkg/plugin/deploy/deployment.go index 0181586c4..8b190eb73 100644 --- a/pkg/plugin/deploy/deployment.go +++ b/pkg/plugin/deploy/deployment.go @@ -14,6 +14,7 @@ type Deploy struct { EngineYard *EngineYard `yaml:"engineyard,omitempty"` Git *Git `yaml:"git,omitempty"` Heroku *Heroku `yaml:"heroku,omitempty"` + Modulus *Modulus `yaml:"modulus,omitempty"` Nodejitsu *Nodejitsu `yaml:"nodejitsu,omitempty"` Openshift *Openshift `yaml:"openshift,omitempty"` } @@ -37,6 +38,9 @@ func (d *Deploy) Write(f *buildfile.Buildfile) { if d.Heroku != nil { d.Heroku.Write(f) } + if d.Modulus != nil { + d.Modulus.Write(f) + } if d.Nodejitsu != nil { d.Nodejitsu.Write(f) } From 492ac956ca1abbb7918c5a592b6f595398254e9c Mon Sep 17 00:00:00 2001 From: Matt Hernandez Date: Sun, 23 Feb 2014 18:07:25 -0500 Subject: [PATCH 8/9] Fixes. Fixed the WriteEnv usage and updated to allow for sudo if necessary. --- pkg/plugin/deploy/modulus.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/plugin/deploy/modulus.go b/pkg/plugin/deploy/modulus.go index 192fccef8..4f016e76e 100644 --- a/pkg/plugin/deploy/modulus.go +++ b/pkg/plugin/deploy/modulus.go @@ -11,10 +11,11 @@ type Modulus struct { } func (m *Modulus) Write(f *buildfile.Buildfile) { - f.writeEnv("MODULUS_TOKEN", m.Token) + f.WriteEnv("MODULUS_TOKEN", m.Token) // Install the Modulus command line interface then deploy the configured // project. - f.WriteCmdSilent("npm install -g modulus") + f.WriteCmdSilent("[ -f /usr/bin/sudo ] || npm install -g modulus") + f.WriteCmdSilent("[ -f /usr/bin/sudo ] && sudo npm install -g modulus") f.WriteCmd(fmt.Sprintf("modulus deploy -p '%s'", m.App)) } From 40296fbd9317a9af47a80e31774203e7c8df5724 Mon Sep 17 00:00:00 2001 From: Matt Hernandez Date: Sun, 23 Feb 2014 18:10:01 -0500 Subject: [PATCH 9/9] Corrected project usage. --- pkg/plugin/deploy/modulus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/plugin/deploy/modulus.go b/pkg/plugin/deploy/modulus.go index 4f016e76e..02a41b6d6 100644 --- a/pkg/plugin/deploy/modulus.go +++ b/pkg/plugin/deploy/modulus.go @@ -17,5 +17,5 @@ func (m *Modulus) Write(f *buildfile.Buildfile) { // project. f.WriteCmdSilent("[ -f /usr/bin/sudo ] || npm install -g modulus") f.WriteCmdSilent("[ -f /usr/bin/sudo ] && sudo npm install -g modulus") - f.WriteCmd(fmt.Sprintf("modulus deploy -p '%s'", m.App)) + f.WriteCmd(fmt.Sprintf("modulus deploy -p '%s'", m.Project)) }