Skip to content
Snippets Groups Projects
Select Git revision
  • 139c2abc9c75df9b0cc16004a90e247e45eae48a
  • main default protected
  • OZG-7856_schadcode-scanner-e2e
  • OZG-7856_schadcode_scanner
  • OZG-7985-fix-sorting
  • OZG-8314-Alfa-Vorgang-Bearbeiter-Zuweisung-entfernen
  • OZG-8305-Create-webpack-sbom
  • tooltip-improvements
  • release-info
  • release-administration
  • release
  • OZG-7714-UpgradeKeycloakDependencyTo25
  • OZG-8086-Admin-Datenanfrage-erstellen
  • OZG-8086-Datenanfrage-Umbenennung
  • mongodb-7-0-16-e2e
  • OZG-6220-Bescheid-speichern-ohne-Postfach
  • OZG-7922-KeycloakOperatorExceptions
  • OZG-8142-poc-cards
  • OZG-8086-E2E
  • OZG-8086-E2E2
  • OZG-8142-ProjectionStuff
  • 1.11.0-info
  • 1.11.0-administration
  • 2.26.0-alfa
  • 1.10.0-info
  • 1.10.0-administration
  • 2.25.0-alfa
  • 1.9.0-info
  • 1.9.0-administration
  • 2.24.0-alfa
  • 1.8.0-info
  • 1.8.0-administration
  • 2.23.0-alfa
  • 1.7.0-info
  • 1.7.0-administration
  • 2.22.0-alfa
  • 1.6.0-info
  • 1.6.0-administration
  • 2.21.0-alfa
  • 1.5.0-info
  • 1.5.0-administration
41 results

Jenkinsfile

Blame
  • Jenkinsfile 17.51 KiB
    pipeline {
        agent {
            node {
                label 'ozgcloud-jenkins-build-agent-jdk21-node20'
            }
        }
    
        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'))
        }
    
        stages {
            stage('Check Version') {
                steps {
                    script {
                        FAILED_STAGE = env.STAGE_NAME
                        VERSION = getRootPomVersion()
                        def serverVersion = getParentPomVersion('alfa-server/pom.xml')
                        def clientVersion = getParentPomVersion('alfa-client/pom.xml')
    
                        if(isReleaseBranch()){
                            if ( !isReleaseVersion([VERSION, serverVersion, clientVersion]) ) {
                                error("Keine Release Version für Branch ${env.BRANCH_NAME}.")
                            }
                        } else {
                            if ( !isSnapshotVersion([VERSION, serverVersion, clientVersion]) ) {
                                error("Keine Snapshot Version für Branch ${env.BRANCH_NAME}.")
                            }
                        }
    
                        if( !isSameVersion([serverVersion, clientVersion], VERSION) ){
                            error("Versionen sind nicht identisch")
                        }
                    }
                }
            }
       
            stage('Client') {
                environment {
                    FORCE_COLOR = 'false'
                }
                steps {
                    script {
                        FAILED_STAGE=env.STAGE_NAME
    
                        withNPM(npmrcConfig: 'npm-nexus-auth') {
                            sh 'npm --version'
                            sh 'node --version'
    
                            dir('alfa-client') {
                                sh 'npm cache verify'
                                sh 'npm install'
    
                                if (isMasterBranch()) {
                                    withSonarQubeEnv('sonarqube-ozg-sh'){
                                        sh 'npm run ci-sonar'
                                }
                                } else {
                                    sh 'npm run ci-test'
                                }