Dockerfile

This commit is contained in:
Mateusz 2024-04-01 17:56:06 +02:00
parent d81c7934f8
commit a61d5c9251
2 changed files with 6 additions and 26 deletions

30
Jenkinsfile vendored
View File

@ -16,35 +16,15 @@ pipeline {
} }
stages { stages {
stage('Clone Repository') {
steps {
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s464913/ium_464913.git'
}
}
stage('Download dataset') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh 'kaggle datasets download -d mlg-ulb/creditcardfraud'
sh 'unzip -o creditcardfraud.zip'
sh 'rm creditcardfraud.zip'
}
}
}
stage('Run create-dataset script') { stage('Run create-dataset script') {
agent { steps {
dockerfile { withEnv (["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
reuseNode true sh 'chmod +x create-dataset.py'
sh 'python3 ./create-dataset.py $KAGGLE_USERNAME'
} }
} }
steps {
sh 'chmod +x create-dataset.py'
sh 'python3 ./create-dataset.py'
}
} }
stage('Archive Artifacts') { stage('Archive Artifacts') {
steps { steps {
archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true

View File

@ -91,7 +91,7 @@ def main():
# download_kaggle_dataset() # download_kaggle_dataset()
os.makedirs("data", exist_ok=True) os.makedirs("data", exist_ok=True)
os.system("ls -al") os.system("rm -rf data/*")
df = load_data("creditcard.csv") df = load_data("creditcard.csv")
df = normalize_data(df) df = normalize_data(df)