Attempt 7
This commit is contained in:
parent
aa11e17bbe
commit
95ff9f5462
@ -5,8 +5,8 @@ RUN pip3 install datasets kaggle
|
|||||||
|
|
||||||
WORKDIR /app
|
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
|
# CMD python3 create-dataset.py
|
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
@ -1,12 +1,32 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent { dockerfile true }
|
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 {
|
stages {
|
||||||
stage('Test') {
|
stage('Kaggle') {
|
||||||
steps {
|
steps {
|
||||||
sh 'python3 --version'
|
script {
|
||||||
sh 'pip3 --version'
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||||
sh 'pip3 list'
|
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||||
|
sh 'kaggle datasets list'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user