forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestDockerScanJob.groovy
43 lines (34 loc) · 1.24 KB
/
TestDockerScanJob.groovy
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
41
42
43
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import jenkins.tests.BuildPipelineTest
import org.junit.Before
import org.junit.Test
import static com.lesfurets.jenkins.unit.global.lib.LibraryConfiguration.library
import static com.lesfurets.jenkins.unit.global.lib.GitSource.gitSource
import static com.lesfurets.jenkins.unit.global.lib.LibraryConfiguration.library
import static com.lesfurets.jenkins.unit.global.lib.GitSource.gitSource
class TestDockerScanJob extends BuildPipelineTest {
@Override
@Before
void setUp() {
helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('1.0.4')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
.retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git'))
.build()
)
super.setUp()
// Variables
binding.setVariable('IMAGE_FULL_NAME', 'alpine:3')
}
@Test
void DockerScan_test() {
super.testPipeline('jenkins/docker/docker-scan.jenkinsfile',
'tests/jenkins/jenkinsjob-regression-files/docker/docker-scan.jenkinsfile')
}
}