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

[CI] Remove GPU pipeline from Jenkinsfile #594

Merged
Merged
Changes from all commits
Commits
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
207 changes: 0 additions & 207 deletions .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -252,214 +252,7 @@ pipeline {
}
}
}
stage('GPU') {
agent {
label 'gpu'
}
environment {
CONDA_HOME = "$HOME/miniconda3"
CONDA_ENV = "$WORKSPACE/env"
PATH = "$HOME/.local/bin:$PATH"
TMP_DIR = "$HOME/tmp"
INPUT_DATA_DIR = '/mnt/data/clinicadl_data_ci/data_ci'
}
stages {
stage('Build Env') {
steps {
echo 'Installing clinicadl sources in Linux...'
echo "My branch name is ${BRANCH_NAME}"
sh "echo 'My branch name is ${BRANCH_NAME}'"
sh 'printenv'
sh "echo 'Agent name: ${NODE_NAME}'"
sh '''#!/usr/bin/env bash
source "${CONDA_HOME}/etc/profile.d/conda.sh"
make env.conda
conda activate "${CONDA_ENV}"
conda info
echo "Install clinicadl using poetry..."
cd $WORKSPACE
make env
# Show clinicadl help message
echo "Display clinicadl help message"
clinicadl --help
conda deactivate
'''
}
}
stage('Train tests Linux') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'UNSTABLE') {
echo 'Testing train task...'
sh "echo 'Agent name: ${NODE_NAME}'"
sh '''#!/usr/bin/env bash
source "${CONDA_HOME}/etc/profile.d/conda.sh"
conda activate "${CONDA_ENV}"
clinicadl --help
cd $WORKSPACE/tests
poetry run pytest \
--junitxml=./test-reports/test_train_report.xml \
--verbose \
--disable-warnings \
--basetemp=$TMP_DIR \
--input_data_directory=$INPUT_DATA_DIR \
-k "test_train"
conda deactivate
'''
}
}
post {
always {
junit 'tests/test-reports/test_train_report.xml'
}
success {
sh 'rm -rf ${TMP_DIR}/*'
}
}
}
stage('Transfer learning tests Linux') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'UNSTABLE') {
echo 'Testing transfer learning...'
sh "echo 'Agent name: ${NODE_NAME}'"
sh '''#!/usr/bin/env bash
source "${CONDA_HOME}/etc/profile.d/conda.sh"
conda activate "${CONDA_ENV}"
clinicadl --help
cd $WORKSPACE/tests
poetry run pytest \
--junitxml=./test-reports/test_transfer_learning_report.xml \
--verbose \
--disable-warnings \
--basetemp=$TMP_DIR \
--input_data_directory=$INPUT_DATA_DIR \
test_transfer_learning.py
conda deactivate
'''
}
}
post {
always {
junit 'tests/test-reports/test_transfer_learning_report.xml'
}
success {
sh 'rm -rf ${TMP_DIR}/*'
}
}
}
stage('Resume tests Linux') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'UNSTABLE') {
echo 'Testing resume...'
sh "echo 'Agent name: ${NODE_NAME}'"
sh '''#!/usr/bin/env bash
source "${CONDA_HOME}/etc/profile.d/conda.sh"
conda activate "${CONDA_ENV}"
clinicadl --help
cd $WORKSPACE/tests
poetry run pytest \
--junitxml=./test-reports/test_resume_report.xml \
--verbose \
--disable-warnings \
--basetemp=$TMP_DIR \
--input_data_directory=$INPUT_DATA_DIR \
test_resume.py
conda deactivate
'''
}
}
post {
always {
junit 'tests/test-reports/test_resume_report.xml'
}
success {
sh 'rm -rf ${TMP_DIR}/*'
}
}
}
stage('Interpretation tests Linux') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'UNSTABLE') {
echo 'Testing interpret task...'
sh "echo 'Agent name: ${NODE_NAME}'"
sh '''#!/usr/bin/env bash
set +x
source "${CONDA_HOME}/etc/profile.d/conda.sh"
conda activate "${CONDA_ENV}"
clinicadl --help
cd $WORKSPACE/tests
poetry run pytest \
--junitxml=./test-reports/test_interpret_report.xml \
--verbose \
--disable-warnings \
--basetemp=$TMP_DIR \
--input_data_directory=$INPUT_DATA_DIR \
test_interpret.py
conda deactivate
'''
}
}
post {
always {
junit 'tests/test-reports/test_interpret_report.xml'
}
success {
sh 'rm -rf ${TMP_DIR}/*'
}
}
}
stage('Random search tests Linux') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'UNSTABLE') {
echo 'Testing random search...'
sh "echo 'Agent name: ${NODE_NAME}'"
sh '''#!/usr/bin/env bash
set +x
source "${CONDA_HOME}/etc/profile.d/conda.sh"
conda activate "${CONDA_ENV}"
clinicadl --help
cd $WORKSPACE/tests
poetry run pytest \
--junitxml=./test-reports/test_random_search_report.xml \
--verbose \
--disable-warnings \
--basetemp=$TMP_DIR \
--input_data_directory=$INPUT_DATA_DIR \
test_random_search.py
conda deactivate
'''
}
}
post {
always {
junit 'tests/test-reports/test_random_search_report.xml'
}
success {
sh 'rm -rf ${TMP_DIR}/*'
}
}
}
}
post {
// Clean after build
cleanup {
cleanWs(deleteDirs: true,
notFailBuild: true,
patterns: [[pattern: 'env', type: 'INCLUDE']])
}
}
}
}
}
}
// post {
// failure {
// mail to: '[email protected]',
// subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
// body: "Something is wrong with ${env.BUILD_URL}"
// mattermostSend(
// color: "#FF0000",
// message: "ClinicaDL Build FAILED: ${env.JOB_NAME} #${env.BUILD_NUMBER} (<${env.BUILD_URL}|Link to build>)"
// )
// }
// }
}
Loading