Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #131

Merged
merged 27 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
88334fa
modified jenkinfile for adme
akadapa Feb 23, 2024
228fa84
modified jenkinfile for adme
akadapa Feb 23, 2024
e40a25f
modified jenkinfile for adme
akadapa Feb 23, 2024
32a2e98
modified jenkinfile for adme
akadapa Feb 23, 2024
315d680
modified jenkinfile for adme
akadapa Feb 23, 2024
9572506
modified jenkinfile for adme
akadapa Feb 23, 2024
ab241d4
modified jenkinfile for adme
akadapa Feb 23, 2024
f1cf679
modified jenkinfile for adme
akadapa Feb 23, 2024
8be5b11
modified jenkins-file
akadapa Feb 26, 2024
58eda80
modified jenkins-file
akadapa Feb 26, 2024
93e0b23
modified jenkins-file
akadapa Feb 26, 2024
dfbcd88
updated Angular version to 12.0 in Dockerfile-opendata
akadapa Feb 27, 2024
0b94f46
modified Jenkins-file
akadapa Feb 27, 2024
1ed64d0
modified Jenkins-file
akadapa Feb 27, 2024
f865348
modified Jenkins-file
akadapa Feb 27, 2024
eaafef0
modified Jenkins-file
akadapa Feb 27, 2024
b857d85
Merge pull request #110 from akadapa/development
tzhao Feb 28, 2024
24d499b
added HLM model
Aug 1, 2024
955bf10
removed pubchem AID for HLM data
Aug 1, 2024
1527dd5
adding training data files
Aug 6, 2024
479d651
merged with dev_up_vishal branch
Aug 6, 2024
4022f74
Merge pull request #127 from ncats/dev_up_vishal
tzhao Aug 6, 2024
1e7db9a
minor change
Aug 7, 2024
03cb5d4
fixed local filepath issue
Aug 7, 2024
e3dff07
Merge pull request #128 from ncats/dev_up_vishal
tzhao Aug 7, 2024
72edcb7
added HLM to API doc
Aug 8, 2024
1317668
Merge pull request #130 from ncats/dev_up_vishal
tzhao Aug 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile-opendata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /opt/adme

COPY client ./

RUN npm install && npm install -g @angular/cli
RUN npm install && npm install -g @angular/cli@12

# build parameter for opendata subdomain
RUN ng build --configuration production --deploy-url=/adme/client/ --base-href=/adme
Expand Down
58 changes: 41 additions & 17 deletions Jenkinsfile-ncats
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
pipeline {
options {
timestamps()
disableConcurrentBuilds()
}
parameters {
string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)')
string(name: 'ENVIRONMENT', defaultValue: 'ci', description: 'Role Name (mandatory)')
}
agent {
label 'ncatsldvifx01'
label 'ncats && dpi && ci && odp-api-python'
}
triggers {
pollSCM('H/5 * * * *')
}
environment {
PROJECT_NAME = "adme"
DOCKER_REPO_NAME = "registry.ncats.nih.gov:5000/adme"
INIT_TOKEN = credentials('Vault-Access') // OIDC provider this token is Auto Generated //
SPHINX_TOKEN = credentials('ncatssvcdvops-sphinx') // PatToken Read Only Access for the DevOps Artifacts Repo https://github.com/Sphinx-Automation/devops-pipeline-artifacts.git //
ROLE_NAME = "$ENVIRONMENT-$PROJECT_NAME" // Role Name is Mandatory Variable for Vault //
}
stages {
stage('Docker/Apps getSecrets By Role') {
steps {
cleanWs()
checkout scm
script {
sh '''
### Cloning the repo from DevOps Artifacts Repository Repo ###
git clone https://[email protected]/Sphinx-Automation/devops-pipeline-artifacts.git
### Running the script with Env specific to Authenticate Vault & Get Application Secrets for Docker Token###
cd devops-pipeline-artifacts/application
/bin/bash getNcatsDockerSecretsByRole.sh
/bin/bash getAppSecretsByRole.sh
'''
}
}
}
stage('Build Version') {
when {
expression {
Expand All @@ -39,21 +62,22 @@ pipeline {
}
}
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}")
}
configFileProvider([
configFile(fileId: 'prepare.sh', targetLocation: 'prepare.sh')
]){
script {
withEnv([
"IMAGE_NAME=adme",
"BUILD_VERSION=" + (params.BUILD_VERSION ?: env.BUILD_VERSION)
]) {
checkout scm
sh '''#!/bin/bash
source prepare.sh
docker login https://registry.ncats.nih.gov:5000 -u "${DOCKERLOGIN}" -p "${DOCKERPASSWORD}"
docker build --no-cache -f ./Dockerfile-ncats --build-arg BUILD_VERSION=${BUILD_VERSION} -t ${DOCKER_REPO_NAME} .
docker tag ${DOCKER_REPO_NAME}:latest ${DOCKER_REPO_NAME}:${BUILD_VERSION}
docker push ${DOCKER_REPO_NAME}:${BUILD_VERSION}
'''
}
}
}
Expand Down
84 changes: 55 additions & 29 deletions Jenkinsfile-opendata
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@
pipeline {
options {
timestamps()
disableConcurrentBuilds()
}
parameters {
string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)')
string(name: 'ENVIRONMENT', defaultValue: 'ci', description: 'Role Name (mandatory)')
}
agent {
label 'ncatsldvifx01'
label 'ncats && dpi && ci && odp-api-python'
}
triggers {
pollSCM('H/5 * * * *')
}
environment {
PROJECT_NAME = "adme"
PROJECT_NAME = "odp"
DOCKER_REPO_NAME = "registry.ncats.nih.gov:5000/adme"
INIT_TOKEN = credentials('Vault-Access') // OIDC provider this token is Auto Generated //
SPHINX_TOKEN = credentials('ncatssvcdvops-sphinx') // PatToken Read Only Access for the DevOps Artifacts Repo https://github.com/Sphinx-Automation/devops-pipeline-artifacts.git //
ROLE_NAME = "$ENVIRONMENT-$PROJECT_NAME" // Role Name is Mandatory Variable for Vault //
APP_TYPE = "adme"
}
stages {
stage('Docker/Apps getSecrets By Role') {
steps {
cleanWs()
checkout scm
script {
sh '''
### Cloning the repo from DevOps Artifacts Repository Repo ###
git clone https://[email protected]/Sphinx-Automation/devops-pipeline-artifacts.git
### Running the script with Env specific to Authenticate Vault & Get Application Secrets for Docker Token###
cd devops-pipeline-artifacts/application
/bin/bash getNcatsDockerSecretsByRole.sh
/bin/bash getAppSecretsByRole.sh
'''
}
}
}
stage('Build Version') {
when {
expression {
Expand All @@ -43,41 +63,47 @@ pipeline {
}
}
steps {
sshagent (credentials: ['labsharesvc']) {
sh 'git submodule update --init --recursive'
withEnv([
"IMAGE_NAME=adme",
"BUILD_VERSION=" + (params.BUILD_VERSION ?: env.BUILD_VERSION)
]) {
script {
// build and push for opendata adme image
docker.withRegistry("https://registry.ncats.nih.gov:5000", "564b9230-c7e3-482d-b004-8e79e5e9720a") {
def image = docker.build(
"${env.IMAGE_NAME}:${env.BUILD_VERSION}", "-f Dockerfile-opendata --no-cache ."
)
// Push the image to the registry
image.push("${env.BUILD_VERSION}")
}
configFileProvider([
configFile(fileId: 'prepare.sh', targetLocation: 'prepare.sh')
]){
script {
withEnv([
"IMAGE_NAME=adme",
"BUILD_VERSION=" + (params.BUILD_VERSION ?: env.BUILD_VERSION)
]) {
checkout scm
sh '''#!/bin/bash
source prepare.sh
docker login https://registry.ncats.nih.gov:5000 -u "${DOCKERLOGIN}" -p "${DOCKERPASSWORD}"
docker build --no-cache -f ./Dockerfile-opendata --build-arg BUILD_VERSION=${BUILD_VERSION} -t ${DOCKER_REPO_NAME} .
docker tag ${DOCKER_REPO_NAME}:latest ${DOCKER_REPO_NAME}:${BUILD_VERSION}
docker push ${DOCKER_REPO_NAME}:${BUILD_VERSION}
'''
}
}
}
}
}
stage('deploy docker') {
agent {
node { label 'ncatsldvifx01'}
}
steps {
//cleanWs()
checkout scm
configFileProvider([
configFile(fileId: 'adme-dev-compose', targetLocation: 'docker-compose.yml'),
configFile(fileId: 'config.json', targetLocation: 'config.json')
configFile(fileId: 'dev-docker-compose.yaml', targetLocation: 'docker-compose.yaml'),
configFile(fileId: 'config.json', targetLocation: 'config.json'),
configFile(fileId: 'deploy.sh', targetLocation: 'deploy.sh')
]) {
script {
docker.withRegistry('https://registry.ncats.nih.gov:5000', '564b9230-c7e3-482d-b004-8e79e5e9720a') {
def docker = new org.labshare.Docker()
docker.deployDockerAPI()
}
}
sh """
chmod 755 config.json
/bin/bash deploy.sh
docker-compose -p $PROJECT_NAME down -v --rmi all | xargs echo
docker pull $DOCKER_REPO_NAME:$BUILD_VERSION
docker rmi $DOCKER_REPO_NAME:latest | xargs echo
docker tag $DOCKER_REPO_NAME:$BUILD_VERSION $DOCKER_REPO_NAME:latest
docker-compose -p $PROJECT_NAME up -d
docker start nginx-gen | xargs echo
docker rmi \$(docker images -aq) | xargs echo
"""
}
}
}
Expand Down
Loading