Merge remote changes from Gitea

This commit is contained in:
Joungmin
2026-02-19 13:29:16 +09:00

24
Jenkinsfile vendored
View File

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