-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
37 lines (35 loc) · 1.29 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
pipeline {
agent any
environment {
JAVA_HOME = "/usr/lib/jvm/java-11-amazon-corretto.x86_64"
PATH = "$JAVA_HOME/bin:$PATH"
}
tools {
// Install the Maven version 3.8.4 and add it to the path.
maven 'maven384'
}
stages {
stage('Initialize') {
steps {
script {
sh("javac -version")
sh("newgrp docker")
sh("id")
sh("echo 'ECR REG: ${env.ECR_REGISTRY}'")
sh("aws ecr get-login-password --region ${env.AWS_REGION} | docker login --username AWS --password-stdin ${env.ECR_REGISTRY}")
sh("pip3 install pyyaml")
}
}
}
stage('Run Build Script') {
steps {
script {
git branch: "${params.branch}", url: "https://github.com/CDLUC3/merritt-docker.git"
sh("bin/fresh_build.sh -j '$env.WORKSPACE' -C '${params.build_config}' -m '${params.maven_profile}' -p '${params.tag_pub}' -t '${params.repo_tag}'")
archiveArtifacts artifacts: "build-output/**"
sh("cp -r build-output/artifacts/* /apps/devtools/data/jenkins/userContent/")
}
}
}
}
}