Skip to content

Commit

Permalink
fix: move code.
Browse files Browse the repository at this point in the history
  • Loading branch information
beneiltis committed Apr 24, 2024
1 parent 69c0bbf commit 53867ed
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
19 changes: 0 additions & 19 deletions structs/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,12 @@ package structs

import (
"os/exec"
"time"

"github.com/mogenius/punq/utils"

"github.com/mogenius/punq/logger"
)

type Command struct {
Id string `json:"id"`
JobId string `json:"jobId"`
ProjectId string `json:"projectId"`
NamespaceId *string `json:"namespaceId,omitempty"`
ServiceId *string `json:"serviceId,omitempty"`
Title string `json:"title"`
Message string `json:"message,omitempty"`
StartedAt string `json:"startedAt"`
State JobStateEnum `json:"state"`
DurationMs int64 `json:"durationMs"`
MustSucceed bool `json:"mustSucceed"`
ReportToNotificationSvc bool `json:"reportToNotificationService"`
IgnoreError bool `json:"ignoreError"`
BuildId int `json:"buildId,omitempty"`
Started time.Time
}

func ExecuteShellCommandSilent(title string, shellCmd string) {
var err error
output, err := utils.RunOnLocalShell(shellCmd).Output()
Expand Down
11 changes: 0 additions & 11 deletions structs/enums.go
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
package structs

type JobStateEnum string

const (
JobStateFailed JobStateEnum = "FAILED"
JobStateSucceeded JobStateEnum = "SUCCEEDED"
JobStateStarted JobStateEnum = "STARTED"
JobStatePending JobStateEnum = "PENDING"
JobStateCanceled JobStateEnum = "CANCELED"
JobStateTimeout JobStateEnum = "TIMEOUT"
)

0 comments on commit 53867ed

Please sign in to comment.