Skip to content

Commit

Permalink
actions: change docker-compose to use /var/run/docker.sock instead of…
Browse files Browse the repository at this point in the history
… tcp.
  • Loading branch information
Michiel Stigter committed Nov 13, 2023
1 parent ad8ed88 commit f1ea5ee
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 40 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/for-dependabot-to-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,12 @@ jobs:
-e ARTIFACTORY_URL \
-e ARTIFACTORY_USERNAME \
-e BUILD_VERSION \
-e DOCKER_CERT_PATH \
-e DOCKER_HOST=tcp://docker:2376 \
-e DOCKER_TLS_CERTDIR \
-e DOCKER_TLS_VERIFY \
-e GIT_REVISION \
-e RUNNING_IN_CI \
-e VAULT_ROLE_ID \
-e VAULT_SECRET_ID \
-v /certs:/certs \
-v /mnt/halfpipe-cache/halfpipe-team:/var/halfpipe/shared-cache \
-v /var/run/docker.sock:/var/run/docker.sock \
app
- name: Docker cleanup
if: always()
Expand Down
6 changes: 1 addition & 5 deletions e2e/actions/deploy-cf/workflowExpected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,17 +377,13 @@ jobs:
-e ARTIFACTORY_URL \
-e ARTIFACTORY_USERNAME \
-e BUILD_VERSION \
-e DOCKER_CERT_PATH \
-e DOCKER_HOST=tcp://docker:2376 \
-e DOCKER_TLS_CERTDIR \
-e DOCKER_TLS_VERIFY \
-e GIT_REVISION \
-e RUNNING_IN_CI \
-e TEST_ROUTE \
-e VAULT_ROLE_ID \
-e VAULT_SECRET_ID \
-v /certs:/certs \
-v /mnt/halfpipe-cache/:/var/halfpipe/shared-cache \
-v /var/run/docker.sock:/var/run/docker.sock \
app
env:
TEST_ROUTE: halfpipe-example-dev-CANDIDATE.springernature.app
Expand Down
12 changes: 2 additions & 10 deletions e2e/actions/docker-compose/workflowExpected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,12 @@ jobs:
-e ARTIFACTORY_URL \
-e ARTIFACTORY_USERNAME \
-e BUILD_VERSION \
-e DOCKER_CERT_PATH \
-e DOCKER_HOST=tcp://docker:2376 \
-e DOCKER_TLS_CERTDIR \
-e DOCKER_TLS_VERIFY \
-e GIT_REVISION \
-e RUNNING_IN_CI \
-e VAULT_ROLE_ID \
-e VAULT_SECRET_ID \
-v /certs:/certs \
-v /mnt/halfpipe-cache/halfpipe-team:/var/halfpipe/shared-cache \
-v /var/run/docker.sock:/var/run/docker.sock \
app
- name: Package artifacts
run: tar -cvf /tmp/halfpipe-artifacts.tar e2e/actions/docker-compose/foo e2e/actions/docker-compose/bar/baz
Expand Down Expand Up @@ -116,18 +112,14 @@ jobs:
-e ARTIFACTORY_USERNAME \
-e B \
-e BUILD_VERSION \
-e DOCKER_CERT_PATH \
-e DOCKER_HOST=tcp://docker:2376 \
-e DOCKER_TLS_CERTDIR \
-e DOCKER_TLS_VERIFY \
-e F \
-e GIT_REVISION \
-e RUNNING_IN_CI \
-e S \
-e VAULT_ROLE_ID \
-e VAULT_SECRET_ID \
-v /certs:/certs \
-v /mnt/halfpipe-cache/halfpipe-team:/var/halfpipe/shared-cache \
-v /var/run/docker.sock:/var/run/docker.sock \
customservice \
echo hello
env:
Expand Down
18 changes: 3 additions & 15 deletions e2e/actions/feature-update-pipeline-and-tag/workflowExpected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,12 @@ jobs:
-e ARTIFACTORY_URL \
-e ARTIFACTORY_USERNAME \
-e BUILD_VERSION \
-e DOCKER_CERT_PATH \
-e DOCKER_HOST=tcp://docker:2376 \
-e DOCKER_TLS_CERTDIR \
-e DOCKER_TLS_VERIFY \
-e GIT_REVISION \
-e RUNNING_IN_CI \
-e VAULT_ROLE_ID \
-e VAULT_SECRET_ID \
-v /certs:/certs \
-v /mnt/halfpipe-cache/team:/var/halfpipe/shared-cache \
-v /var/run/docker.sock:/var/run/docker.sock \
app
- name: Docker cleanup
if: always()
Expand Down Expand Up @@ -123,16 +119,12 @@ jobs:
-e ARTIFACTORY_URL \
-e ARTIFACTORY_USERNAME \
-e BUILD_VERSION \
-e DOCKER_CERT_PATH \
-e DOCKER_HOST=tcp://docker:2376 \
-e DOCKER_TLS_CERTDIR \
-e DOCKER_TLS_VERIFY \
-e GIT_REVISION \
-e RUNNING_IN_CI \
-e VAULT_ROLE_ID \
-e VAULT_SECRET_ID \
-v /certs:/certs \
-v /mnt/halfpipe-cache/team:/var/halfpipe/shared-cache \
-v /var/run/docker.sock:/var/run/docker.sock \
app
- name: Docker cleanup
if: always()
Expand Down Expand Up @@ -161,16 +153,12 @@ jobs:
-e ARTIFACTORY_URL \
-e ARTIFACTORY_USERNAME \
-e BUILD_VERSION \
-e DOCKER_CERT_PATH \
-e DOCKER_HOST=tcp://docker:2376 \
-e DOCKER_TLS_CERTDIR \
-e DOCKER_TLS_VERIFY \
-e GIT_REVISION \
-e RUNNING_IN_CI \
-e VAULT_ROLE_ID \
-e VAULT_SECRET_ID \
-v /certs:/certs \
-v /mnt/halfpipe-cache/team:/var/halfpipe/shared-cache \
-v /var/run/docker.sock:/var/run/docker.sock \
app
- name: Docker cleanup
if: always()
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
Expand Down
6 changes: 1 addition & 5 deletions renderers/actions/docker_compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ func dockerComposeScript(task manifest.DockerCompose, team string) string {
}

options := []string{
"-e DOCKER_HOST=tcp://docker:2376",
"-e DOCKER_TLS_CERTDIR",
"-e DOCKER_TLS_VERIFY",
"-e DOCKER_CERT_PATH",
"-v /certs:/certs",
"-v /var/run/docker.sock:/var/run/docker.sock",
fmt.Sprintf("-v /mnt/halfpipe-cache/%s:/var/halfpipe/shared-cache", team),
}
for key := range allEnvVars {
Expand Down

0 comments on commit f1ea5ee

Please sign in to comment.