mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-27 02:40:30 +00:00
Merge pull request #204 from indexzero/add-jitsu-deploy
First pass at "jitsu deploy"
This commit is contained in:
commit
83424d327e
1 changed files with 11 additions and 0 deletions
|
@ -1,12 +1,23 @@
|
|||
package deploy
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/drone/drone/pkg/build/buildfile"
|
||||
)
|
||||
|
||||
type Nodejitsu struct {
|
||||
App string `yaml:"app,omitempty"`
|
||||
User string `yaml:"user,omitempty"`
|
||||
Token string `yaml:"token,omitempty"`
|
||||
}
|
||||
|
||||
func (n *Nodejitsu) Write(f *buildfile.Buildfile) {
|
||||
f.WriteEnv("username", m.User)
|
||||
f.WriteEnv("apiToken", m.Token)
|
||||
|
||||
// Install the jitsu command line interface then
|
||||
// deploy the configured app.
|
||||
f.WriteCmdSilent("[ -f /usr/bin/sudo ] || npm install -g jitsu")
|
||||
f.WriteCmdSilent("[ -f /usr/bin/sudo ] && sudo npm install -g jitsu")
|
||||
f.WriteCmd("jitsu deploy")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue