cleanup logging statements
This commit is contained in:
parent
454b219a40
commit
ce5fbcf2e2
2 changed files with 5 additions and 7 deletions
|
@ -18,7 +18,7 @@ import (
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
git "gopkg.in/src-d/go-git.v4"
|
git "gopkg.in/src-d/go-git.v4"
|
||||||
"gopkg.in/src-d/go-git.v4/plumbing"
|
"gopkg.in/src-d/go-git.v4/plumbing"
|
||||||
"gopkg.in/yaml.v2"
|
yaml "gopkg.in/yaml.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var cloneLock sync.Mutex
|
var cloneLock sync.Mutex
|
||||||
|
@ -212,17 +212,16 @@ func NewGitCloneExecutor(input NewGitCloneExecutorInput) Executor {
|
||||||
|
|
||||||
err = w.Pull(&git.PullOptions{
|
err = w.Pull(&git.PullOptions{
|
||||||
ReferenceName: refName,
|
ReferenceName: refName,
|
||||||
|
Force: true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil && err.Error() != "already up-to-date" {
|
||||||
input.Logger.Errorf("Unable to pull %s: %v", refName, err)
|
input.Logger.Errorf("Unable to pull %s: %v", refName, err)
|
||||||
}
|
}
|
||||||
input.Logger.Debugf("Cloned %s to %s", input.URL.String(), input.Dir)
|
input.Logger.Debugf("Cloned %s to %s", input.URL.String(), input.Dir)
|
||||||
|
|
||||||
err = w.Checkout(&git.CheckoutOptions{
|
err = w.Checkout(&git.CheckoutOptions{
|
||||||
//Branch: plumbing.NewHash(ref),
|
|
||||||
Branch: refName,
|
Branch: refName,
|
||||||
//Hash: plumbing.NewHash(input.Ref),
|
Force: true,
|
||||||
Force: true,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
input.Logger.Errorf("Unable to checkout %s: %v", refName, err)
|
input.Logger.Errorf("Unable to checkout %s: %v", refName, err)
|
||||||
|
|
|
@ -10,7 +10,6 @@ import (
|
||||||
"github.com/docker/docker/api/types/container"
|
"github.com/docker/docker/api/types/container"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
"github.com/nektos/act/common"
|
"github.com/nektos/act/common"
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"golang.org/x/crypto/ssh/terminal"
|
"golang.org/x/crypto/ssh/terminal"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -95,7 +94,7 @@ func createContainer(input NewDockerRunExecutorInput, cli *client.Client) (strin
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
input.Logger.Debugf("Created container name=%s id=%v from image %v", input.Name, resp.ID, input.Image)
|
input.Logger.Debugf("Created container name=%s id=%v from image %v", input.Name, resp.ID, input.Image)
|
||||||
log.Debugf("ENV ==> %v", input.Env)
|
input.Logger.Debugf("ENV ==> %v", input.Env)
|
||||||
|
|
||||||
return resp.ID, nil
|
return resp.ID, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue