Dockerfile

This commit is contained in:
Ramón Vásquez 2025-10-29 15:40:52 -03:00
parent 4038adf14d
commit 8c779e180c
3 changed files with 9 additions and 12 deletions

4
Dockerfile Normal file
View file

@ -0,0 +1,4 @@
FROM python:3.13-slim
WORKDIR /app
COPY . /app
CMD ["python3", "test.py"]

13
Jenkinsfile vendored
View file

@ -2,17 +2,10 @@ pipeline {
agent any agent any
stages { stages {
stage('Install Python') { stage('Build') {
steps { steps {
echo 'Installing Python...' echo 'Building...'
sh 'apt-get update && apt-get install -y python3 python3-pip' sh 'docker build -t my-python-app .'
}
}
stage('Test') {
steps {
echo 'Running tests...'
sh 'python3 test.py'
} }
} }
} }

View file

@ -2,9 +2,9 @@ from time import sleep
def main(): def main():
while True: for _ in range(100):
print('Hello, World!') print('Hello, World!')
sleep(1) sleep(3)
if __name__ == '__main__': if __name__ == '__main__':