diff --git a/Jenkinsfile.admin b/Jenkinsfile.admin index 56c20de85b5ca92ab3b912af303bf8b691b9d3cc..32dd06e2912dab4d05728b2baddb0e95ee9bba0a 100644 --- a/Jenkinsfile.admin +++ b/Jenkinsfile.admin @@ -34,31 +34,28 @@ pipeline { stage('build admin client and its docker image') { steps { script { - FAILED_STAGE=env.STAGE_NAME - - dir('alfa-client') { - sh 'echo "registry=https://nexus.ozg-sh.de/repository/npm-proxy" >> ~/.npmrc' - sh 'echo "//nexus.ozg-sh.de/:_auth=amVua2luczprTSFnNVUhMVQzNDZxWQ==" >> ~/.npmrc' - - sh 'npm cache verify' - sh 'npm install' - - if (isReleaseBranch()) { - sh 'npm run ci-prodBuild-admin' - } else { - sh 'npm run ci-build-admin' - } - if (isMasterBranch()) { - try { + FAILED_STAGE=env.STAGE_NAME + + dir('alfa-client') { + sh 'echo "registry=https://nexus.ozg-sh.de/repository/npm-proxy" >> ~/.npmrc' + sh 'echo "//nexus.ozg-sh.de/:_auth=amVua2luczprTSFnNVUhMVQzNDZxWQ==" >> ~/.npmrc' + + sh 'npm cache verify' + sh 'npm install' + + if (isReleaseBranch()) { + sh 'npm run ci-prodBuild-admin' + } else { + sh 'npm run ci-build-admin' + } + if (isMasterBranch()) { withSonarQubeEnv('sonarqube-ozg-sh'){ - sh 'npm run ci-sonar-admin' + sh 'npm run ci-sonar' } + } else { + sh 'npm run ci-test' } - catch (Exception e) { - unstable("SonarQube failed") - } - } - } + } } } } diff --git a/alfa-client/package.json b/alfa-client/package.json index fcc5b9638eb668f162512ac970621496023432aa..6c07b2b9f16c61036f4ebb7fe22b22894ca0d741 100644 --- a/alfa-client/package.json +++ b/alfa-client/package.json @@ -20,7 +20,6 @@ "ci-prodBuild-admin": "nx container admin && cp -r dist/ apps/admin/", "ci-test": "nx run-many --target=test --parallel 8 -- --runInBand", "ci-sonar": "nx run-many --target=test --parallel 8 -- --runInBand --codeCoverage --coverageReporters=lcov --testResultsProcessor=jest-sonar-reporter && npx sonar-scanner", - "ci-sonar-admin": "nx run admin:test --runInBand --codeCoverage --coverageReporters=lcov --testResultsProcessor=jest-sonar-reporter && npx sonar-scanner -Dsonar.projectBaseDir=./apps/admin", "lint": "nx workspace-lint && nx lint", "affected:apps": "nx affected:apps", "affected:libs": "nx affected:libs",