Run multilingual audit on Jenkins built-in node

This commit is contained in:
2026-04-10 18:54:30 +02:00
parent b86849b1e4
commit 5e49eb93a2
2 changed files with 29 additions and 4 deletions

26
Jenkinsfile vendored
View File

@@ -142,13 +142,33 @@ PY
} }
} }
stage('Post-Deploy Multilingual Audit') { stage('Post-Deploy Multilingual Audit') {
agent { label 'built-in' }
options { options {
timeout(time: 10, unit: 'MINUTES') timeout(time: 10, unit: 'MINUTES')
} }
steps { steps {
sh 'mkdir -p artifacts && chmod +x scripts/run_remote_multilingual_audit.sh' withCredentials([
withCredentials([sshUserPrivateKey(credentialsId: env.STAGING_AUDIT_SSH_CREDENTIALS_ID, keyFileVariable: 'STAGING_SSH_KEYFILE')]) { sshUserPrivateKey(credentialsId: 'gitea-ssh', keyFileVariable: 'GIT_KEYFILE'),
sh './scripts/run_remote_multilingual_audit.sh' sshUserPrivateKey(credentialsId: env.STAGING_AUDIT_SSH_CREDENTIALS_ID, keyFileVariable: 'STAGING_SSH_KEYFILE')
]) {
sh '''
export GIT_SSH_COMMAND="ssh -i $GIT_KEYFILE -o StrictHostKeyChecking=accept-new"
if [ -d .git ]; then
if git remote get-url origin >/dev/null 2>&1; then
git remote set-url origin ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git
else
git remote add origin ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git
fi
git fetch --tags --force --progress origin +refs/heads/master:refs/remotes/origin/master
else
git clone ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git .
git fetch --tags --force --progress origin +refs/heads/master:refs/remotes/origin/master
fi
git checkout -f refs/remotes/origin/master
mkdir -p artifacts
chmod +x scripts/run_remote_multilingual_audit.sh
./scripts/run_remote_multilingual_audit.sh
'''
} }
script { script {
int status = sh(script: 'python3 scripts/multilingual_audit_ci.py --json artifacts/multilingual-audit.json', returnStatus: true) int status = sh(script: 'python3 scripts/multilingual_audit_ci.py --json artifacts/multilingual-audit.json', returnStatus: true)

View File

@@ -17,12 +17,17 @@ pipeline {
} }
stages { stages {
stage('Checkout') { stage('Checkout') {
agent { label 'built-in' }
steps { steps {
withCredentials([sshUserPrivateKey(credentialsId: 'gitea-ssh', keyFileVariable: 'GIT_KEYFILE')]) { withCredentials([sshUserPrivateKey(credentialsId: 'gitea-ssh', keyFileVariable: 'GIT_KEYFILE')]) {
sh ''' sh '''
export GIT_SSH_COMMAND="ssh -i $GIT_KEYFILE -o StrictHostKeyChecking=accept-new" export GIT_SSH_COMMAND="ssh -i $GIT_KEYFILE -o StrictHostKeyChecking=accept-new"
if [ -d .git ]; then if [ -d .git ]; then
if git remote get-url origin >/dev/null 2>&1; then
git remote set-url origin ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git git remote set-url origin ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git
else
git remote add origin ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git
fi
git fetch --tags --force --progress origin +refs/heads/master:refs/remotes/origin/master git fetch --tags --force --progress origin +refs/heads/master:refs/remotes/origin/master
else else
git clone ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git . git clone ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git .