Skip to content
Snippets Groups Projects
Commit 94e19bca authored by OZGCloud's avatar OZGCloud
Browse files

ozg-7032 jenkins use withnpm

parent a3aa7b84
No related branches found
No related tags found
No related merge requests found
...@@ -53,27 +53,27 @@ pipeline { ...@@ -53,27 +53,27 @@ pipeline {
script { script {
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
sh 'npm --version' withNPM(npmrcConfig: 'npm-nexus-auth') {
sh 'node --version' sh 'npm --version'
dir('alfa-client') { sh 'node --version'
sh 'echo "registry=https://nexus.ozg-sh.de/repository/npm-proxy" >> ~/.npmrc'
sh 'echo "//nexus.ozg-sh.de/:_auth=amVua2luczprTSFnNVUhMVQzNDZxWQ==" >> ~/.npmrc' dir('alfa-client') {
sh 'npm cache verify'
sh 'npm cache verify' sh 'npm install'
sh 'npm install'
if (isMasterBranch()) {
if (isMasterBranch()) { withSonarQubeEnv('sonarqube-ozg-sh'){
withSonarQubeEnv('sonarqube-ozg-sh'){ sh 'npm run ci-sonar'
sh 'npm run ci-sonar' }
} else {
sh 'npm run ci-test'
}
if (isReleaseBranch()) {
sh 'npm run ci-prodBuild'
}
else {
sh 'npm run ci-build'
} }
} else {
sh 'npm run ci-test'
}
if (isReleaseBranch()) {
sh 'npm run ci-prodBuild'
}
else {
sh 'npm run ci-build'
} }
} }
} }
...@@ -92,7 +92,9 @@ pipeline { ...@@ -92,7 +92,9 @@ pipeline {
dir('alfa-client') { dir('alfa-client') {
IMAGE_TAG = generateImageTag() IMAGE_TAG = generateImageTag()
sh 'npm run ci-build-alfa-client-container' withNPM(npmrcConfig: 'npm-nexus-auth') {
sh 'npm run ci-build-alfa-client-container'
}
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}' sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}'
......
...@@ -35,27 +35,26 @@ pipeline { ...@@ -35,27 +35,26 @@ pipeline {
steps { steps {
script { script {
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
dir('alfa-client') { withNPM(npmrcConfig: 'npm-nexus-auth') {
sh 'echo "registry=https://nexus.ozg-sh.de/repository/npm-proxy" >> ~/.npmrc' dir('alfa-client') {
sh 'echo "//nexus.ozg-sh.de/:_auth=amVua2luczprTSFnNVUhMVQzNDZxWQ==" >> ~/.npmrc' sh 'npm cache verify'
sh 'npm install'
sh 'npm cache verify'
sh 'npm install' if (isReleaseBranch()) {
sh 'npm run ci-prodBuild-admin'
if (isReleaseBranch()) { } else {
sh 'npm run ci-prodBuild-admin' sh 'npm run ci-build-admin'
} else { }
sh 'npm run ci-build-admin' if (isMasterBranch()) {
} withSonarQubeEnv('sonarqube-ozg-sh'){
if (isMasterBranch()) { sh 'npm run ci-sonar'
withSonarQubeEnv('sonarqube-ozg-sh'){ }
sh 'npm run ci-sonar' } else {
sh 'npm run ci-test'
} }
} else { }
sh 'npm run ci-test' }
}
}
} }
} }
} }
......
...@@ -36,20 +36,14 @@ pipeline { ...@@ -36,20 +36,14 @@ pipeline {
steps { steps {
script { script {
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
dir('alfa-client') {
withNPM(npmrcConfig: 'a4272a20-bb67-4cf7-8ce5-a1c3ac66613c') {
sh 'npm cache verify'
sh 'npm install'
sh 'npm run ci-storybook'
}
}
withNPM(npmrcConfig: 'npm-nexus-auth') {
dir('alfa-client') {
sh 'npm cache verify'
sh 'npm install'
sh 'npm run ci-storybook'
}
}
} }
} }
} }
......
...@@ -190,14 +190,13 @@ pipeline { ...@@ -190,14 +190,13 @@ pipeline {
script { script {
FAILED_STAGE = env.STAGE_NAME FAILED_STAGE = env.STAGE_NAME
sh 'npm --version' withNPM(npmrcConfig: 'npm-nexus-auth') {
dir('alfa-client') { sh 'npm --version'
sh 'echo "registry=https://nexus.ozg-sh.de/repository/npm-proxy" >> ~/.npmrc' dir('alfa-client') {
sh 'echo "//nexus.ozg-sh.de/:_auth=amVua2luczprTSFnNVUhMVQzNDZxWQ==" >> ~/.npmrc' sh 'npm cache verify'
sh 'npm install'
sh 'npm cache verify' sh "npm run cypress:install"
sh 'npm install' }
sh "npm run cypress:install"
} }
} }
} }
......
...@@ -149,14 +149,13 @@ pipeline { ...@@ -149,14 +149,13 @@ pipeline {
script { script {
FAILED_STAGE = env.STAGE_NAME FAILED_STAGE = env.STAGE_NAME
sh 'npm --version' withNPM(npmrcConfig: 'npm-nexus-auth') {
dir('alfa-client') { sh 'npm --version'
sh 'echo "registry=https://nexus.ozg-sh.de/repository/npm-proxy" >> ~/.npmrc' dir('alfa-client') {
sh 'echo "//nexus.ozg-sh.de/:_auth=amVua2luczprTSFnNVUhMVQzNDZxWQ==" >> ~/.npmrc' sh 'npm cache verify'
sh 'npm install'
sh 'npm cache verify' sh "npm run cypress:install"
sh 'npm install' }
sh "npm run cypress:install"
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment