Skip to content
Snippets Groups Projects
Commit 0a61db23 authored by Daniel Nemergut's avatar Daniel Nemergut
Browse files

Merge branch 'ssh_clone_condor_plugin' into 'main'

Cloning the condor_transfer_plugin over SSH for local builds

See merge request !1349
parents 4462e1d8 59b6abed
No related branches found
No related tags found
2 merge requests!1390Catch up with Main,!1349Cloning the condor_transfer_plugin over SSH for local builds
Pipeline #9912 passed
......@@ -20,9 +20,20 @@ COPY docker.properties /home/casa/capo/docker.properties
ENV CAPO_PROFILE "docker"
RUN git clone --depth=1 https://gitlab.nrao.edu/krowe/condor_transfer_plugin.git \
# Add gitlab as a known SSH host
RUN mkdir -p ~/.ssh && \
chmod 0700 ~/.ssh && \
ssh-keyscan gitlab.nrao.edu > ~/.ssh/known_hosts
# Link to the host's SSH key and clone over SSH (non-public repo)
RUN --mount=type=secret,id=host_ssh_key,required \
ln -s /run/secrets/host_ssh_key ~/.ssh/id_rsa \
&& git clone --depth=1 gitlab@gitlab.nrao.edu:scg/condor_transfer_plugin.git \
&& cp condor_transfer_plugin/nraorsync_plugin.py /usr/libexec/condor/
# Remove SSH stuff
RUN rm -rf ~/.ssh/
# Apply config within the container
RUN ./update-config
RUN /root/bin/boot-execute.sh
......
......@@ -53,6 +53,8 @@ services:
build:
context: .
dockerfile: ./config/htcondor/execute/Dockerfile.local
secrets:
- host_ssh_key # Needed to clone a repo from gitlab, will be mounted during the build
volumes:
- ./delivery_root:/tmp/delivery_root
- ./lustre/aoc/cluster/pipeline/docker/workspaces:/lustre/aoc/cluster/pipeline/docker/workspaces
......@@ -267,3 +269,8 @@ services:
volumes:
condor:
# Store the host's SSH key as a secret to have it removed after building the container, note only RSA for now
secrets:
host_ssh_key:
file: ~/.ssh/id_rsa
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment