-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from ncats/development
Development
- Loading branch information
Showing
136 changed files
with
612 additions
and
13,310 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
.history/* | ||
|
||
.DS_Store | ||
.profraw | ||
notebooks | ||
notebooks/ | ||
env | ||
|
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM node:12 AS build | ||
|
||
WORKDIR /opt/adme | ||
|
||
COPY client ./ | ||
|
||
RUN npm install && npm install -g @angular/cli | ||
|
||
# parameter for adme.ncats subdomain | ||
RUN ng build --configuration production --deploy-url=/models/client/ --base-href=/models | ||
|
||
FROM continuumio/miniconda:4.7.12 | ||
|
||
WORKDIR /opt/adme | ||
|
||
COPY server ./ | ||
|
||
RUN conda env create -f environment.yml | ||
|
||
ENV PATH /opt/conda/envs/ncats-adme/bin:$PATH | ||
|
||
RUN chmod +x startup.sh | ||
|
||
# clean existing client folder | ||
RUN rm -rf client | ||
COPY --from=build /opt/adme/dist/client client | ||
|
||
CMD /bin/bash startup.sh | ||
|
||
EXPOSE 5000 |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM node:12 AS build | ||
|
||
WORKDIR /opt/adme | ||
|
||
COPY client ./ | ||
|
||
RUN npm install && npm install -g @angular/cli | ||
|
||
# build parameter for opendata subdomain | ||
RUN ng build --configuration production --deploy-url=/adme/client/ --base-href=/adme | ||
|
||
FROM continuumio/miniconda:4.7.12 | ||
|
||
WORKDIR /opt/adme | ||
|
||
COPY server ./ | ||
|
||
RUN conda env create -f environment.yml | ||
|
||
ENV PATH /opt/conda/envs/ncats-adme/bin:$PATH | ||
|
||
RUN chmod +x startup.sh | ||
|
||
# clean existing client folder | ||
RUN rm -rf client | ||
COPY --from=build /opt/adme/dist/client client | ||
|
||
CMD /bin/bash startup.sh | ||
|
||
EXPOSE 5000 |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
pipeline { | ||
options { | ||
timestamps() | ||
disableConcurrentBuilds() | ||
} | ||
parameters { | ||
string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)') | ||
} | ||
agent { | ||
label 'ncatsldvifx01' | ||
} | ||
triggers { | ||
pollSCM('H/5 * * * *') | ||
} | ||
stages { | ||
stage('Build Version') { | ||
when { | ||
expression { | ||
return !params.BUILD_VERSION | ||
} | ||
} | ||
steps{ | ||
script { | ||
BUILD_VERSION_GENERATED = VersionNumber( | ||
versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', | ||
projectStartDate: '1970-01-01', | ||
skipFailedBuilds: true) | ||
currentBuild.displayName = BUILD_VERSION_GENERATED | ||
env.BUILD_VERSION = BUILD_VERSION_GENERATED | ||
env.BUILD = 'true' | ||
} | ||
} | ||
} | ||
stage('Build') { | ||
when { | ||
expression { | ||
// Skip build when a specific version is provided | ||
return !params.BUILD_VERSION | ||
} | ||
} | ||
steps { | ||
sshagent (credentials: ['871f96b5-9d34-449d-b6c3-3a04bbd4c0e4']) { | ||
sh 'git submodule update --init --recursive' | ||
withEnv([ | ||
"BUILD_VERSION=" + (params.BUILD_VERSION ?: env.BUILD_VERSION) | ||
]) { | ||
script { | ||
// build and push for ncats adme image | ||
docker.withRegistry("https://registry.ncats.nih.gov:5000", "564b9230-c7e3-482d-b004-8e79e5e9720a") { | ||
def image = docker.build( | ||
"ncats-adme:${env.BUILD_VERSION}", | ||
"-f Dockerfile-ncats --no-cache ." | ||
) | ||
// Push the image to the registry | ||
image.push("${env.BUILD_VERSION}") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.