Merge remote changes from Gitea
This commit is contained in:
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
@@ -18,8 +18,6 @@ pipeline {
|
||||
// Snyk (uncomment and configure)
|
||||
// SNYK_TOKEN = credentials('snyk-token')
|
||||
|
||||
// Paths
|
||||
WORKSPACE = "${WORKSPACE}"
|
||||
}
|
||||
|
||||
stages {
|
||||
@@ -31,7 +29,7 @@ pipeline {
|
||||
echo '📋 Running linters...'
|
||||
|
||||
sh '''
|
||||
source venv/bin/activate
|
||||
. venv/bin/activate
|
||||
|
||||
# Pylint - Python linting with custom config
|
||||
pylint --rcfile=.pylintrc \
|
||||
@@ -75,7 +73,7 @@ pipeline {
|
||||
echo '🔒 Running static security analysis...'
|
||||
|
||||
sh '''
|
||||
source venv/bin/activate
|
||||
. venv/bin/activate
|
||||
|
||||
# Bandit - Python security scanner
|
||||
bandit -r . \
|
||||
@@ -95,7 +93,7 @@ pipeline {
|
||||
|
||||
# Detect Secrets - Hardcoded secrets scan
|
||||
detect-secrets scan \
|
||||
--exclude-files '\.git/.*' \
|
||||
--exclude-files '.git/.*' \
|
||||
--output-format=json \
|
||||
> secrets-report.json || true
|
||||
'''
|
||||
@@ -123,7 +121,7 @@ pipeline {
|
||||
|
||||
withSonarQubeEnv('SonarQube') {
|
||||
sh '''
|
||||
source venv/bin/activate
|
||||
. venv/bin/activate
|
||||
|
||||
sonar-scanner \
|
||||
-Dsonar.projectKey=openclaw \
|
||||
@@ -153,7 +151,7 @@ pipeline {
|
||||
|
||||
withCredentials([string(credentialsId: 'snyk-token', variable: 'SNYK_TOKEN')]) {
|
||||
sh '''
|
||||
source venv/bin/activate
|
||||
. venv/bin/activate
|
||||
|
||||
# Snyk test for Python dependencies
|
||||
snyk test \
|
||||
@@ -183,7 +181,7 @@ pipeline {
|
||||
echo '🧪 Running unit tests...'
|
||||
|
||||
sh '''
|
||||
source venv/bin/activate
|
||||
. venv/bin/activate
|
||||
|
||||
pytest tests/ \
|
||||
-v \
|
||||
@@ -224,7 +222,7 @@ pipeline {
|
||||
echo '🔐 Running security unit tests...'
|
||||
|
||||
sh '''
|
||||
source venv/bin/activate
|
||||
. venv/bin/activate
|
||||
|
||||
pytest tests/test_security.py \
|
||||
-v \
|
||||
@@ -247,7 +245,7 @@ pipeline {
|
||||
echo '🔗 Running integration tests...'
|
||||
|
||||
sh '''
|
||||
source venv/bin/activate
|
||||
. venv/bin/activate
|
||||
|
||||
# Oracle connection test
|
||||
python3 -c "
|
||||
@@ -287,7 +285,7 @@ pipeline {
|
||||
echo '📦 Building application...'
|
||||
|
||||
sh '''
|
||||
source venv/bin/activate
|
||||
. venv/bin/activate
|
||||
|
||||
# Freeze dependencies
|
||||
pip freeze > requirements.locked.txt
|
||||
@@ -326,12 +324,12 @@ pipeline {
|
||||
remoteDirectory: '/home/joungmin/openclaw',
|
||||
execCommand: '''
|
||||
cd /home/joungmin/openclaw
|
||||
source venv/bin/activate
|
||||
. venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
pytest tests/ --tb=short
|
||||
pytest tests/test_security.py --tb=short
|
||||
supervisorctl restart openclaw
|
||||
'
|
||||
'''
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user