-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker will checkout PR if being run during PR CI
- Loading branch information
1 parent
eb66477
commit 7d7b5b4
Showing
3 changed files
with
26 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
FROM debian:12 | ||
LABEL maintainer="Michael Kavulich <[email protected]>" | ||
|
||
# Set up base OS environment | ||
# arguments that can be passed in | ||
ARG PR_NUMBER | ||
|
||
# Set up base OS environment | ||
RUN apt-get -y update | ||
|
||
# Get "essential" tools and libraries | ||
|
@@ -70,11 +72,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 fetch 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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters