diff --git a/Jenkinsfile.admin b/Jenkinsfile.admin new file mode 100644 index 0000000000000000000000000000000000000000..111ca2c5fff71683885dfc840a809ced2ce0c75a --- /dev/null +++ b/Jenkinsfile.admin @@ -0,0 +1,48 @@ +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 diff --git a/alfa-client/package-lock.json b/alfa-client/package-lock.json index 14577917261bad756c03028d361bb469403a14bc..05c9ea2dd537b26dd920ae82a7b8c9e042012f16 100644 --- a/alfa-client/package-lock.json +++ b/alfa-client/package-lock.json @@ -1,12 +1,12 @@ { "name": "alfa", - "version": "0.0.0", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "alfa", - "version": "0.0.0", + "version": "0.1.0", "license": "MIT", "dependencies": { "@angular/animations": "16.2.11", diff --git a/alfa-client/package.json b/alfa-client/package.json index 0ea2f44f86f68c0285268d36703bda00acd484c4..d66013f0643824ef2ae3f3eb761863774d1abec9 100644 --- a/alfa-client/package.json +++ b/alfa-client/package.json @@ -1,6 +1,6 @@ { "name": "alfa", - "version": "0.0.0", + "version": "0.1.0", "license": "MIT", "scripts": { "start": "nx run alfa:serve --port 4300 --disable-host-check", @@ -14,7 +14,9 @@ "test:lib": "nx test ${npm_config_lib} --watchAll", "test:debug:lib": "nx test ${npm_config_lib} --detectOpenHandles --watchAll", "ci-build": "nx run alfa:build --outputHashing=all", + "ci-build-admin": "nx run admin:build --outputHashing=all", "ci-prodBuild": "nx run alfa:build --outputHashing=all --configuration production", + "ci-prodBuild-admin": "nx run admin:build --outputHashing=all --configuration production", "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", "lint": "nx workspace-lint && nx lint",