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

OZG-5021 move jenkinsfile to root

parent 159f4553
Branches
Tags
No related merge requests found
pipeline {
agent {
node {
label 'ozgcloud-jenkins-build-agent'
}
}
environment {
BLUE_OCEAN_URL = "https://jenkins.infra.ozg-cloud.systems/job/alfa/job/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/"
RELEASE_REGEX = /\d+.\d+.\d+/
SNAPSHOT_REGEX = /\d+.\d+.\d+-SNAPSHOT/
FAILED_STAGE = ""
SH_SUCCESS_STATUS_CODE = 0
}
options {
timeout(time: 1, unit: 'HOURS')
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '5'))
}
// TODO check version
stage('build') {
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'
}
}
}
}
}
}
Boolean isReleaseBranch() {
return env.BRANCH_NAME == 'release'
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment