Attempt 7
This commit is contained in:
parent
aa11e17bbe
commit
95ff9f5462
@ -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
|
40
Jenkinsfile
vendored
40
Jenkinsfile
vendored
@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user