Prepare application and Ansible validation pipeline
myfileagent-python-ci/pipeline/head This commit looks good
myfileagent-python-ci/pipeline/head This commit looks good
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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' } }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,3 +21,6 @@
|
||||
|
||||
## Agent Jenkins verification
|
||||
- Jenkins job assignment8-agent-check build #1 failed during pipeline parsing because the initial one-line declarative script lacked section separators; no agent work occurred. Corrected script and reran. Build #2 succeeded on assignment8-trusted and verified Python 3.13.5, Git 2.47.3, Docker CLI 26.1.5, Ansible core 2.22.0, and community.docker 5.0.4. Evidence: https://ci.myfileagent.tech/job/assignment8-agent-check/2/console . Docker daemon access and deployment credentials remain unconfigured.
|
||||
|
||||
## Validation preparation
|
||||
- Ansible syntax check passed on assignment8-trusted against the starter playbook on 2026-11-04. The inventory and release records still contain placeholders; syntax success is not deployment. Added a separate draft validation Jenkinsfile for tests and syntax checks; it has not been run in Jenkins.
|
||||
|
||||
Reference in New Issue
Block a user