diff --git a/README.md b/README.md index 5be0934..8d3e0f5 100644 --- a/README.md +++ b/README.md @@ -293,7 +293,7 @@ Run the tests with the following commands for both `alpine` and `ubuntu` images: ```sh docker build -t pool-resource --target tests -f dockerfiles/alpine/Dockerfile . -docker build -t pool-resource --target tests -f dockerfiles/ubuntu/Dockerfile . +docker build -t pool-resource --target tests -f dockerfiles/ubuntu/Dockerfile --build-arg base_image=ubuntu:latest . ``` #### Note about the integration tests diff --git a/out/git_lock_handler.go b/out/git_lock_handler.go index d5dad01..ae9f91f 100644 --- a/out/git_lock_handler.go +++ b/out/git_lock_handler.go @@ -205,14 +205,22 @@ func (glh *GitLockHandler) Setup() error { return err } - _, err = glh.git("config", "user.name", "CI Pool Resource") + _, err = glh.git("config", "user.name") if err != nil { - return err + // hardcode git user.name if not already set in git_config + _, err = glh.git("config", "user.name", "CI Pool Resource") + if err != nil { + return err + } } - _, err = glh.git("config", "user.email", "ci-pool@localhost") + _, err = glh.git("config", "user.email") if err != nil { - return err + // hardcode git user.email if not already set in git_config + _, err = glh.git("config", "user.email", "ci-pool@localhost") + if err != nil { + return err + } } return nil