From 242372e381ecbcab4078e7d8c0916073d600d970 Mon Sep 17 00:00:00 2001 From: Codex Date: Wed, 4 Nov 2026 19:30:57 +0000 Subject: [PATCH] Prepare application and Ansible validation pipeline --- secure-delivery/Jenkinsfile.validation | 22 ++++++++++++++++++++++ secure-delivery/WORK_LOG.md | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 secure-delivery/Jenkinsfile.validation diff --git a/secure-delivery/Jenkinsfile.validation b/secure-delivery/Jenkinsfile.validation new file mode 100644 index 0000000..cef37cd --- /dev/null +++ b/secure-delivery/Jenkinsfile.validation @@ -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' } } + } + } +} diff --git a/secure-delivery/WORK_LOG.md b/secure-delivery/WORK_LOG.md index 0dc543e..891956c 100644 --- a/secure-delivery/WORK_LOG.md +++ b/secure-delivery/WORK_LOG.md @@ -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.