Files
Codex 242372e381
myfileagent-python-ci/pipeline/head This commit looks good
Prepare application and Ansible validation pipeline
2026-11-04 19:30:57 +00:00

23 lines
661 B
Plaintext

pipeline {
agent { label 'assignment8-trusted' }
options { disableConcurrentBuilds(); timeout(time: 15, unit: 'MINUTES'); timestamps() }
stages {
stage('Checkout') { steps { checkout scm } }
stage('Unit tests') {
steps {
dir('secure-delivery/v1') {
sh '''set -eu
python3 -m venv .test-venv
.test-venv/bin/pip install -r requirements.txt
.test-venv/bin/python -m py_compile app.py test_app.py
.test-venv/bin/python -m unittest -v
'''
}
}
}
stage('Ansible syntax') {
steps { dir('secure-delivery') { sh 'ansible-playbook -i ansible/inventory.ini ansible/deploy.yml --syntax-check' } }
}
}
}