This commit is contained in:
bartosz.maslanka.consultant 2023-04-21 15:56:43 +02:00
parent 3f7a91f1db
commit c467dc04b0
2 changed files with 50 additions and 5 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM ubuntu:latest
RUN apt-get update \
&& apt-get install -y git python3 python3-pip curl \
&& curl -O https://bootstrap.pypa.io/get-pip.py \
&& python3 get-pip.py --user \
&& rm get-pip.py \
&& pip3 install --user kaggle \
&& pip3 install --user pandas \
&& pip3 install --user seaborn \
&& pip3 install --user scikit-learn
ENV PATH="/root/.local/bin:$PATH"
WORKDIR /app
COPY . /app
CMD ["python", "create_dataset.py"]

39
Jenkinsfile vendored
View File

@ -1,11 +1,42 @@
pipeline { pipeline {
agent any
stages { stages {
stage('Stage 1') { stage('Preparation') {
steps { properties([
echo 'Hello world!' parameters([
string(
defaultValue: 'tomaszzitkiewicz',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
),
password(
defaultValue: '',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
])
])
} }
stage('Checkout') {
steps {
git branch: 'master', url: 'https://git.wmi.amu.edu.pl/s487184/ium_487184'
}
}
stage('Run Script') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'kaggle datasets download -d elakiricoder/gender-classification-dataset > output.txt'
} }
} }
} }
stage('Archive Artifacts') {
steps {
archiveArtifacts 'output.txt'
}
}
}
}