-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
37 lines (37 loc) · 945 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
pipeline {
environment {
registry = "bitsanjay198/aqua-test"
registryCredential = 'bitsanjay198'
dockerImage = ''
}
agent any
stages {
stage('Cloning our Git') {
steps {
git 'https://github.com/sanjay-shah/aqua-ci-example.git'
}
}
stage('Building our image') {
steps {
script {
dockerImage = docker.build registry + ":$BUILD_NUMBER"
}
}
}
stage("Scan aqua-docker-test image using Aqua Scanner"){
steps {
aqua customFlags: '', hideBase: false, hostedImage: '', localImage: registry + ":$BUILD_NUMBER", locationType: 'local', notCompliesCmd: '', onDisallowed: 'ignore', policies: '', register: false, registry: '', showNegligible: false
}
}
stage('Push image') {
steps {
sh "echo `docker login -u bitSanjay198 -p xxxxxx && docker push $registry:$BUILD_NUMBER`"
}
}
stage('Cleaning up') {
steps {
sh "docker rmi $registry:$BUILD_NUMBER"
}
}
}
}