-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
40 lines (35 loc) · 1003 Bytes
/
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
38
39
40
pipeline{
agent any
environment{
GITHUB_TOKEN = credentials('githubToken')
AWS_ACCESS_KEY_ID = credentials('awsAccessKey')
AWS_SECRET_ACCESS_KEY = credentials('awsSecretKey')
AWS_DEFAULT_REGION = 'eu-central-1'
}
tools {
nodejs "node-20"
}
stages{
stage('Build'){
steps{
sh './gradlew build -x test'
}
}
stage('Unit Testing'){
steps{
sh './gradlew test'
}
}
// Normally we would have a stage for integration testing
// At this stage we could also use sonarqube to verify quality criteria
// Maybe generate swagger file to make a custom API Gateway
stage('Deploy'){
steps{
dir('infra'){
sh 'npm install'
sh 'npx cdk deploy --require-approval never'
}
}
}
}
}