Skip to content

Commit

Permalink
refactor: rename DockerQuietDeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
kimdre committed Aug 8, 2024
1 parent d1acc29 commit acfa9d6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/doco-cd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func main() {

log.Debug("connection to docker socket was successful")

dockerCli, err := docker.CreateDockerCli(c.QuietDockerDeploy, !c.SkipTLSVerification)
dockerCli, err := docker.CreateDockerCli(c.DockerQuietDeploy, !c.SkipTLSVerification)

Check warning on line 256 in cmd/doco-cd/main.go

View check run for this annotation

Codecov / codecov/patch

cmd/doco-cd/main.go#L256

Added line #L256 was not covered by tests
if err != nil {
log.Critical("failed to create docker client", logger.ErrAttr(err))
return
Expand Down
2 changes: 1 addition & 1 deletion cmd/doco-cd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestHandleEvent(t *testing.T) {

ctx := context.Background()

dockerCli, err := docker.CreateDockerCli(appConfig.QuietDockerDeploy, !appConfig.SkipTLSVerification)
dockerCli, err := docker.CreateDockerCli(appConfig.DockerQuietDeploy, !appConfig.SkipTLSVerification)
if err != nil {
if tc.expectedStatusCode == http.StatusInternalServerError {
return
Expand Down
2 changes: 1 addition & 1 deletion internal/config/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type AppConfig struct {
AuthType string `env:"AUTH_TYPE" envDefault:"oauth2"` // AuthType is the type of authentication to use when cloning repositories
SkipTLSVerification bool `env:"SKIP_TLS_VERIFICATION" envDefault:"false"` // SkipTLSVerification skips the TLS verification when cloning repositories.
DockerAPIVersion string `env:"DOCKER_API_VERSION" envDefault:"v1.40" validate:"regexp=^v[0-9]+\\.[0-9]+$"` // DockerAPIVersion is the version of the Docker API to use
QuietDockerDeploy bool `env:"QUIET_DOCKER_DEPLOY" envDefault:"true"` // QuietDockerDeploy suppresses the status output of dockerCli in deployments (e.g. pull, create, start)
DockerQuietDeploy bool `env:"DOCKER_QUIET_DEPLOY" envDefault:"true"` // DockerQuietDeploy suppresses the status output of dockerCli in deployments (e.g. pull, create, start)
}

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/docker/compose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestDeployCompose(t *testing.T) {

t.Log("Deploy compose")

dockerCli, err := CreateDockerCli(c.QuietDockerDeploy, !c.SkipTLSVerification)
dockerCli, err := CreateDockerCli(c.DockerQuietDeploy, !c.SkipTLSVerification)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit acfa9d6

Please sign in to comment.