Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit d09014c

Browse files
authored
Merge pull request #147 from facebookresearch/chown-conda
Allow Jenkins to write to root conda env
2 parents 1517d70 + 131ddae commit d09014c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docker/common/add_jenkins_user.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,11 @@ chown jenkins:jenkins /var/lib/jenkins/.ccache
1818
# Allow writing to /usr/local (for make install)
1919
chown jenkins:jenkins /usr/local
2020

21+
# Allow writing to conda root env
22+
if [[ "$BUILD_ENVIRONMENT" == *-conda* ]]; then
23+
echo "Chowning Conda"
24+
chown jenkins:jenkins /opt/conda
25+
fi
26+
2127
# Allow sudo
2228
echo 'jenkins ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/jenkins

docker/ubuntu-cuda-conda/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ RUN bash ./install_protobuf.sh && rm install_protobuf.sh
3535
ARG JENKINS
3636
ARG JENKINS_UID
3737
ARG JENKINS_GID
38+
ARG BUILD_ENVIRONMENT
3839
ADD ./common/add_jenkins_user.sh add_jenkins_user.sh
3940
RUN if [ -n "${JENKINS}" ]; then bash ./add_jenkins_user.sh ${JENKINS_UID} ${JENKINS_GID}; fi
4041
RUN rm add_jenkins_user.sh

0 commit comments

Comments
 (0)