diff --git a/Dockerfile_2 b/Dockerfile_2 new file mode 100644 index 0000000..4917ee6 --- /dev/null +++ b/Dockerfile_2 @@ -0,0 +1,27 @@ +# Nasz obraz będzie dzidziczył z obrazu Ubuntu w wersji latest +FROM ubuntu:latest + +# Instalujemy niezbędne zależności. Zwróć uwagę na flagę "-y" (assume yes) +RUN apt update && apt install -y figlet + +WORKDIR /app + +RUN apt-get install -y python3 +RUN apt-get install -y python3-pip +RUN python3 -m pip install pandas +RUN python3 -m pip install numpy +RUN python3 -m pip install torch +RUN python3 -m pip install torchvision + +COPY ./zadanie1.py ./ +COPY ./Customers.csv ./ +#COPY ./train.py ./ +COPY ./test.py ./ +#COPY ./cifar_net.pth ./ + +RUN chmod +r ./Customers.csv +#RUN chmod +x ./zadanie1.py +#RUN chmod +x ./train.py +RUN chmod +x ./test.py + +CMD python3 ./test.py \ No newline at end of file diff --git a/Jenkinsfile_4 b/Jenkinsfile_4 new file mode 100644 index 0000000..db67895 --- /dev/null +++ b/Jenkinsfile_4 @@ -0,0 +1,44 @@ +pipeline { + agent { + dockerfile { + filename 'Dockerfile_2.build' + // dir 'build' + label 'label' + //additionalBuildArgs '--build-arg version=1.0.2' + //args '-v /tmp:/tmp' + } + } + parameters { + buildSelector ( + name: 'BUILD_SELECTOR', + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts?', + ) + } + stages { + stage('Load Artifact') { + steps { + script { + copyArtifacts fingerprintArtifacts: true, projectName: 's452627-training', selector: buildParameter("BUILD_SELECTOR") + } + } + } + stage('Run Script') { + steps { + script { + //sh "chmod +x -R ${env.WORKSPACE}" + //sh './make_statistic.sh | tee output_statistic.txt' + // sh 'docker build . -t jhenyk/ium:latest' + // sh 'docker run jhenyk/ium:latest' + sh 'node --version' + } + } + + } + stage('Archive Output') { + steps { + archiveArtifacts 'testresults.txt' + } + } + } +} \ No newline at end of file