ium_478841/Jenkinsfile

76 lines
2.2 KiB
Plaintext
Raw Normal View History

2022-03-21 11:22:38 +01:00
String repoUrl = "https://git.wmi.amu.edu.pl/s478841/ium_478841.git"
2022-03-26 14:57:58 +01:00
pipeline {
agent any
2022-03-21 11:22:38 +01:00
2022-03-26 14:57:58 +01:00
stages {
stage('gitlab') {
steps {
echo 'Notify GitLab'
updateGitlabCommitStatus name: 'build', state: 'pending'
updateGitlabCommitStatus name: 'build', state: 'success'
}
}
2022-03-21 10:52:35 +01:00
}
2022-03-26 14:57:58 +01:00
}
// node {
// stage('checkout: Check out from version control') {
// echo "Cloning the repository from ${repoUrl}..."
// git clone repoUrl
// echo "Repository cloned"
// }
// stage('sh: Shell Script') {
// //Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
// //sh "figlet \"${INPUT_TEXT}\" | tee output.txt"
// echo "Running the data loading script..."
// sh "./load_data.sh | tee output.txt"
// echo "Data loaded"
// }
// stage('archive artifacts') {
// //Zarchiwizuj wynik
// echo "Saving results to the output.txt..."
// archiveArtifacts 'output.txt'
// }
2022-03-26 15:36:44 +01:00
// }
pipeline {
agent any
parameters {
string(
defaultValue:'mateuszogrodowczyk',
description: 'Kaggle username',
name'KAGGLE_USERNAME',
trim: true
),
password(
defaultValue: '',
description: 'Kaggle access token retrieved from kaggle.json file - https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
}
environment {
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
KAGGLE_KEY="$params.KAGGLE_KEY"
}
stages {
stage('Install depends.') {
steps {
sh "pip install --user -r requirements.txt"
}
}
stage('Prepare dataset') {
steps {
script {
withEnv([
"KAGGLE_USERNAME={$params.KAGGLE_USERNAME}",
"KAGGLE_KEY={$params.KAGGLE_KEY}"
])
sh 'echo Welcome: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
sh "chmod u+x ./test_script.sh"
sh "./test_script.sh"
}
}
}
}