automated terminal push

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

14
Jenkinsfile vendored
View File

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