Skip to content

Commit

Permalink
fix: error when deploying all apps for 1 client
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Mavro committed Sep 7, 2018
1 parent 76e2097 commit 82c02e1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Pipelines struct {

// deployCmd represents the deploy command
var deployCmd = &cobra.Command{
Use: "deploy <client id> [app name]",
Use: "deploy <client id|all> [app name]",
Short: "Deploy client ID applications and application (optional)",
Args: cobra.RangeArgs(1, 2),
Run: func(cmd *cobra.Command, args []string) {
Expand Down Expand Up @@ -158,6 +158,10 @@ func gitlabRunJob(git *gitlab.Client, pipelineId int, jobs []*gitlab.Job, jobNam
if err != nil {
log.Fatalf("Wasn't able to play job %s id %s on pipeline %s: %s", jobName, strconv.Itoa(jobId), strconv.Itoa(pipelineId), err)
}
log.Infof("Job successfully been launched (%s/%s)", args[0], args[1])
if len(args) == 2 {
log.Infof("Job successfully been launched (%s/%s)", args[0], args[1])
} else {
log.Infof("Job successfully been launched (%s)", args[0])
}
log.Infof("Job progression: https://gitlab.com/%s/-/jobs/%s", viper.GetString("gitlab_project_name"), strconv.Itoa(jobId))
}

0 comments on commit 82c02e1

Please sign in to comment.