From 8c779e180c4f186467d99fce2265cc3fd22000f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20V=C3=A1squez?= Date: Wed, 29 Oct 2025 15:40:52 -0300 Subject: [PATCH] Dockerfile --- Dockerfile | 4 ++++ Jenkinsfile | 13 +++---------- test.py | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d8abdb8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM python:3.13-slim +WORKDIR /app +COPY . /app +CMD ["python3", "test.py"] \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index fca6196..240f4df 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,17 +2,10 @@ pipeline { agent any stages { - stage('Install Python') { + stage('Build') { steps { - echo 'Installing Python...' - sh 'apt-get update && apt-get install -y python3 python3-pip' - } - } - - stage('Test') { - steps { - echo 'Running tests...' - sh 'python3 test.py' + echo 'Building...' + sh 'docker build -t my-python-app .' } } } diff --git a/test.py b/test.py index acc65c7..8291323 100644 --- a/test.py +++ b/test.py @@ -2,9 +2,9 @@ from time import sleep def main(): - while True: + for _ in range(100): print('Hello, World!') - sleep(1) + sleep(3) if __name__ == '__main__':