Attempt 7

This commit is contained in:
Paweł Skórzewski 2024-04-10 10:05:01 +02:00
parent aa11e17bbe
commit 95ff9f5462
2 changed files with 32 additions and 12 deletions

View File

@ -5,8 +5,8 @@ RUN pip3 install datasets kaggle
WORKDIR /app
RUN mkdir -p .kaggle && chmod 600 .kaggle
VOLUME ["/app/.kaggle"]
COPY ./create-dataset.py ./
# COPY ./create-dataset.py ./
# CMD python3 create-dataset.py

38
Jenkinsfile vendored
View File

@ -1,12 +1,32 @@
pipeline {
agent { dockerfile true }
stages {
stage('Test') {
steps {
sh 'python3 --version'
sh 'pip3 --version'
sh 'pip3 list'
}
agent {
dockerfile true
}
parameters {
string (
defaultValue: 'my_username',
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/blob/main/docs/README.md#api-credentials',
name: 'KAGGLE_KEY'
)
}
volumes {
hostPath("${HOME}/.kaggle") # Replace with your desired host path
containerPath("/app/.kaggle")
}
stages {
stage('Kaggle') {
steps {
script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
}
}
}
}