diff --git a/lab6/Dockerfile b/lab6/Dockerfile index 40e17a3..002d244 100644 --- a/lab6/Dockerfile +++ b/lab6/Dockerfile @@ -12,3 +12,5 @@ RUN pip3 install matplotlib RUN pip3 install keras COPY ./simple_regression.py ./ +COPY ./evaluate.py ./ +COPY ./plot.py ./ diff --git a/lab6/Jenkinsfile b/lab6/Jenkinsfile_eval similarity index 100% rename from lab6/Jenkinsfile rename to lab6/Jenkinsfile_eval diff --git a/lab6/Jenkinsfile_train b/lab6/Jenkinsfile_train new file mode 100644 index 0000000..6a92f08 --- /dev/null +++ b/lab6/Jenkinsfile_train @@ -0,0 +1,45 @@ +pipeline { + agent { + dockerfile true + } + parameters { + string( + defaultValue: '100', + description: 'Example training parameter', + name: 'EPOCHS_NUM' + ) + } + stages { + stage('Stage 1') { + steps { + sh 'chmod u+x ./simple_regression.py' + echo 'Copying datasets from create-dataset...' + copyArtifacts filter: '*', projectName: 's449288-create-dataset' + echo 'Datasets copied' + echo 'Conducting simple regression model test' + sh 'python3 simple_regression.py $EPOCHS_NUM' + echo 'Model and predictions saved' + sh 'head lego_reg_results.csv' + sh 'ls -lh lego_reg_model' + echo 'Archiving model...' + sh 'tar -czf lego_reg_model.tar.gz lego_reg_model/' + archiveArtifacts 'lego_reg_model.tar.gz' + echo 'Model archived' + } + } + } + post { + success { + emailext body: 'SUCCESS', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + failure { + emailext body: 'FAILURE', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + unstable { + emailext body: 'UNSTABLE', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + changed { + emailext body: 'CHANGED', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + } +} \ No newline at end of file