#!/bin/env groovy // This script is used internally by Enea for automated tests on Linux builds MANIFEST_REPOSITORY = null BRANCH = env.BRANCH_NAME def scmInstance = scm.getUserRemoteConfigs()[0] MANIFEST_REPOSITORY = scmInstance.getUrl() def git_repo = MANIFEST_REPOSITORY.trim().split('/')[-1] def git_repo_name = git_repo.replace('.git','') def profile = git_repo_name.split('-')[-1] env.PROFILE = profile print "MANIFEST_REPOSITORY: " + MANIFEST_REPOSITORY print "git_repo_name: " + git_repo_name print "PROFILE: " + env.PROFILE System.exit(2) // node ('master') { // print 'master node' // dir ("../${env.BRANCH_NAME}@script") { // def git_remote_url = sh returnStdout: true, script: "git remote get-url origin" // def git_repo = git_remote_url.trim().split('/')[-1] // def git_repo_name = git_repo.replace('.git','') // def profile = git_repo_name.split('-')[-1] // env.PROFILE = profile // MANIFEST_REPOSITORY = git_remote_url.trim() // sh 'echo $PROFILE' // } // } fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') { fileLoader.load('freeze_manifest.groovy'); } fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') { fileLoader.load('eltf_pipeline.groovy'); }