chore: 完善NapCat自动化Jenkins归档
This commit is contained in:
parent
b8b46a04c3
commit
598180615c
@ -2,6 +2,8 @@ pipeline {
|
|||||||
agent any
|
agent any
|
||||||
|
|
||||||
options {
|
options {
|
||||||
|
buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
|
||||||
|
disableConcurrentBuilds()
|
||||||
skipDefaultCheckout(true)
|
skipDefaultCheckout(true)
|
||||||
timestamps()
|
timestamps()
|
||||||
timeout(time: 60, unit: 'MINUTES')
|
timeout(time: 60, unit: 'MINUTES')
|
||||||
@ -86,6 +88,18 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
sh '''
|
||||||
|
set +e
|
||||||
|
rm -rf "$WORKSPACE/artifacts"
|
||||||
|
mkdir -p "$WORKSPACE/artifacts/napcat-runtime-release"
|
||||||
|
cp -a "$KT_ARTIFACT_ROOT/napcat-runtime-release/." "$WORKSPACE/artifacts/napcat-runtime-release/" 2>/dev/null || true
|
||||||
|
'''
|
||||||
|
archiveArtifacts artifacts: 'artifacts/napcat-runtime-release/**/*', allowEmptyArchive: true, fingerprint: false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -2,6 +2,8 @@ pipeline {
|
|||||||
agent any
|
agent any
|
||||||
|
|
||||||
options {
|
options {
|
||||||
|
buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
|
||||||
|
disableConcurrentBuilds()
|
||||||
skipDefaultCheckout(true)
|
skipDefaultCheckout(true)
|
||||||
timestamps()
|
timestamps()
|
||||||
timeout(time: 30, unit: 'MINUTES')
|
timeout(time: 30, unit: 'MINUTES')
|
||||||
@ -48,4 +50,16 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
sh '''
|
||||||
|
set +e
|
||||||
|
rm -rf "$WORKSPACE/artifacts"
|
||||||
|
mkdir -p "$WORKSPACE/artifacts/napcat-upstream-sync"
|
||||||
|
cp -a "$KT_ARTIFACT_ROOT/napcat-upstream-sync/." "$WORKSPACE/artifacts/napcat-upstream-sync/" 2>/dev/null || true
|
||||||
|
'''
|
||||||
|
archiveArtifacts artifacts: 'artifacts/napcat-upstream-sync/**/*', allowEmptyArchive: true, fingerprint: false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -475,6 +475,9 @@ export async function runSelfTest(): Promise<void> {
|
|||||||
"RUN_CODEX_AUDIT",
|
"RUN_CODEX_AUDIT",
|
||||||
"CONFIRM_CODEX_WORKSPACE_WRITE",
|
"CONFIRM_CODEX_WORKSPACE_WRITE",
|
||||||
"RUN_CODEX_WORKSPACE_WRITE_AUDIT",
|
"RUN_CODEX_WORKSPACE_WRITE_AUDIT",
|
||||||
|
"buildDiscarder(logRotator",
|
||||||
|
"disableConcurrentBuilds()",
|
||||||
|
"archiveArtifacts artifacts: 'artifacts/napcat-upstream-sync/**/*'",
|
||||||
]) {
|
]) {
|
||||||
if (!upstreamSyncJenkinsTemplate.includes(expected)) {
|
if (!upstreamSyncJenkinsTemplate.includes(expected)) {
|
||||||
throw new Error(`NapCat upstream Jenkins template missing: ${expected}`);
|
throw new Error(`NapCat upstream Jenkins template missing: ${expected}`);
|
||||||
@ -558,6 +561,9 @@ export async function runSelfTest(): Promise<void> {
|
|||||||
"choice(name: 'API_PROMOTION_JOB'",
|
"choice(name: 'API_PROMOTION_JOB'",
|
||||||
"CONFIRM_API_PROMOTION_TARGET",
|
"CONFIRM_API_PROMOTION_TARGET",
|
||||||
"PROMOTE_KT_TEMPLATE_API_MAIN",
|
"PROMOTE_KT_TEMPLATE_API_MAIN",
|
||||||
|
"buildDiscarder(logRotator",
|
||||||
|
"disableConcurrentBuilds()",
|
||||||
|
"archiveArtifacts artifacts: 'artifacts/napcat-runtime-release/**/*'",
|
||||||
]) {
|
]) {
|
||||||
if (!runtimeReleaseJenkinsTemplate.includes(expected)) {
|
if (!runtimeReleaseJenkinsTemplate.includes(expected)) {
|
||||||
throw new Error(`NapCat runtime Jenkins template missing: ${expected}`);
|
throw new Error(`NapCat runtime Jenkins template missing: ${expected}`);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user