automated terminal push

This commit is contained in:
lenape
2025-06-29 16:41:55 +00:00
parent 5ea60ff698
commit b77a1f7f3d

16
Jenkinsfile vendored
View File

@@ -56,8 +56,9 @@ pipeline {
// Use Docker for consistent, isolated build environment // Use Docker for consistent, isolated build environment
docker.image(env.BUILD_IMAGE).inside('-e HOME=/tmp -e PIP_CACHE_DIR=/tmp/.pip') { docker.image(env.BUILD_IMAGE).inside('-e HOME=/tmp -e PIP_CACHE_DIR=/tmp/.pip') {
sh ''' sh '''
# Configure pip to use CodeArtifact without trying to save global config # Corporate standard: CodeArtifact primary, PyPI fallback
export PIP_INDEX_URL="${CODEART_URL}" export PIP_INDEX_URL="${CODEART_URL}"
export PIP_EXTRA_INDEX_URL="https://pypi.org/simple/"
# Install build dependencies # Install build dependencies
pip install --upgrade setuptools wheel twine pip install --upgrade setuptools wheel twine
@@ -98,7 +99,10 @@ pipeline {
script { script {
docker.image(env.BUILD_IMAGE).inside('-e HOME=/tmp -e PIP_CACHE_DIR=/tmp/.pip') { docker.image(env.BUILD_IMAGE).inside('-e HOME=/tmp -e PIP_CACHE_DIR=/tmp/.pip') {
sh ''' sh '''
# Corporate standard: CodeArtifact primary, PyPI fallback
export PIP_INDEX_URL="${CODEART_URL}" export PIP_INDEX_URL="${CODEART_URL}"
export PIP_EXTRA_INDEX_URL="https://pypi.org/simple/"
pip install safety pip install safety
safety check --json --output safety-report.json || true safety check --json --output safety-report.json || true
''' '''
@@ -115,7 +119,9 @@ pipeline {
script { script {
docker.image(env.BUILD_IMAGE).inside('-e HOME=/tmp -e PIP_CACHE_DIR=/tmp/.pip') { docker.image(env.BUILD_IMAGE).inside('-e HOME=/tmp -e PIP_CACHE_DIR=/tmp/.pip') {
sh ''' sh '''
# Corporate standard: CodeArtifact primary, PyPI fallback
export PIP_INDEX_URL="${CODEART_URL}" export PIP_INDEX_URL="${CODEART_URL}"
export PIP_EXTRA_INDEX_URL="https://pypi.org/simple/"
# Install test dependencies if they exist # Install test dependencies if they exist
if [ -f requirements-test.txt ]; then if [ -f requirements-test.txt ]; then
@@ -135,8 +141,12 @@ pipeline {
} }
post { post {
always { always {
// Publish test results // Publish test results if they exist
publishTestResults testResultsPattern: 'test-results.xml' script {
if (fileExists('test-results.xml')) {
publishTestResults testResultsPattern: 'test-results.xml'
}
}
} }
} }
} }