From 7d827bf89d028f5569c49c56b0f79f2c4ae00168 Mon Sep 17 00:00:00 2001 From: Alicja Szulecka <73056579+AliSzu@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:33:49 +0200 Subject: [PATCH] env 2 --- Dockerfile | 7 ++----- Jenkinsfile | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc96876..32743fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM ubuntu:latest # Dockerfile -ARG KAGGLE_USERNAME -ARG KAGGLE_KEY +ENV KAGGLE_USERNAME=alicjaszulecka +ENV KAGGLE_KEY=default_key RUN apt update && apt install -y python3-pip RUN apt install unzip @@ -13,9 +13,6 @@ RUN pip install --user scikit-learn RUN pip install --user matplotlib RUN pip install --user geopandas -RUN mkdir /.kaggle -RUN chmod +x /.kaggle - WORKDIR /app COPY ./get_dataset.sh ./ \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index c9b8ec5..1b53492 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { script { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { - def customImage = docker.build("custom-image", "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} .") + def customImage = docker.build("custom-image", "--build-arg KAGGLE_USERNAME=$KAGGLE_USERNAME --build-arg KAGGLE_KEY=$KAGGLE_KEY .") customImage.inside { sh 'bash ./get_dataset.sh $CUTOFF' archiveArtifacts artifacts: 'artifacts/*', onlyIfSuccessful: true