Skip to content

Commit

Permalink
pass CTF_API_SOCK to s2i
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Dowland <[email protected]>
  • Loading branch information
jmtd committed Nov 21, 2024
1 parent 33cd56e commit 2f713a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion steps/s2i_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ def s2i_inner(context, application, path='.', env="", incremental=False, tag="ma
assemble_user = labels.get("io.openshift.s2i.assemble-user", False)
scripts_url = labels.get("io.openshift.s2i.scripts-url", False)

docker_url = os.environ.get("CTF_API_SOCK", 'unix://var/run/docker.sock')

with tempfile.TemporaryDirectory(prefix="behave-test-steps.") as workdir:
dockerfile = os.path.join(workdir, "Dockerfile")

# Perform S2I Dockerfile/source generation
command = f"""s2i build --loglevel=5 --pull-policy if-not-present\
command = f"""s2i \
--url {docker_url}\
build --loglevel=5 --pull-policy if-not-present\
{mirror}\
--context-dir={path}\
-r={tag}\
Expand Down

0 comments on commit 2f713a5

Please sign in to comment.