Skip to content

Commit

Permalink
Docker will checkout PR if being run during PR CI
Browse files Browse the repository at this point in the history
  • Loading branch information
scrasmussen committed Jul 25, 2024
1 parent 5eaa43f commit 4b298bc
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,20 @@ ENV sp_ROOT=/comsoftware/nceplibs
ENV w3emc_ROOT=/comsoftware/nceplibs

# Obtain CCPP SCM source code, build code, and download static data
RUN cd /comsoftware \
&& git clone --recursive -b main https://github.com/NCAR/ccpp-scm \
&& mkdir /comsoftware/ccpp-scm/scm/bin

RUN cd /comsoftware/ccpp-scm/scm/bin \
RUN if [ -z "$PR_NUMBER" ]; then \
cd /comsoftware \
&& git clone --recursive -b main https://github.com/NCAR/ccpp-scm; \
else \
cd /comsoftware \
&& git clone https://github.com/NCAR/ccpp-scm \
&& cd ccpp-scm \
&& git checkout origin pull/${PR_NUMBER}/head:test_pr \
&& git checkout test_pr \
&& git submodule update --init --recursive; \
fi

RUN mkdir /comsoftware/ccpp-scm/scm/bin \
&& cd /comsoftware/ccpp-scm/scm/bin \
&& cmake ../src \
&& make -j

Expand Down

0 comments on commit 4b298bc

Please sign in to comment.