-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
83 lines (76 loc) · 2.69 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* Generated from templates/source-repo/Jenkinsfile.njk. Do not edit directly. */
library identifier: 'RHTAP_Jenkins@main', retriever: modernSCM(
[$class: 'GitSCMSource',
remote: 'https://github.com/redhat-appstudio/tssc-sample-jenkins.git'])
pipeline {
agent any
environment {
ROX_API_TOKEN = credentials('ROX_API_TOKEN')
ROX_CENTRAL_ENDPOINT = credentials('ROX_CENTRAL_ENDPOINT')
GITOPS_AUTH_PASSWORD = credentials('GITOPS_AUTH_PASSWORD')
/* Uncomment this when using Gitlab */
/* GITOPS_AUTH_USERNAME = credentials('GITOPS_AUTH_USERNAME') */
/* Set this to the user for your specific registry */
/* IMAGE_REGISTRY_USER = credentials('IMAGE_REGISTRY_USER') */
/* Set this password for your specific registry */
/* IMAGE_REGISTRY_PASSWORD = credentials('IMAGE_REGISTRY_PASSWORD') */
/* Default registry is set to quay.io */
QUAY_IO_CREDS = credentials('QUAY_IO_CREDS')
/* ARTIFACTORY_IO_CREDS = credentials('ARTIFACTORY_IO_CREDS') */
/* NEXUS_IO_CREDS = credentials('NEXUS_IO_CREDS') */
COSIGN_SECRET_PASSWORD = credentials('COSIGN_SECRET_PASSWORD')
COSIGN_SECRET_KEY = credentials('COSIGN_SECRET_KEY')
COSIGN_PUBLIC_KEY = credentials('COSIGN_PUBLIC_KEY')
REKOR_HOST = credentials("REKOR_HOST")
}
stages {
stage('init') {
steps {
script {
rhtap.info('init')
rhtap.init()
}
}
}
stage('build') {
steps {
script {
rhtap.info('buildah_rhtap')
rhtap.buildah_rhtap()
rhtap.info('cosign_sign_attest')
rhtap.cosign_sign_attest()
}
}
}
stage('scan') {
steps {
script {
rhtap.info('acs_deploy_check')
rhtap.acs_deploy_check()
rhtap.info('acs_image_check')
rhtap.acs_image_check()
rhtap.info('acs_image_scan')
rhtap.acs_image_scan()
}
}
}
stage('deploy') {
steps {
script {
rhtap.info('update_deployment')
rhtap.update_deployment()
}
}
}
stage('summary') {
steps {
script {
rhtap.info('show_sbom_rhdh')
rhtap.show_sbom_rhdh()
rhtap.info('summary')
rhtap.summary()
}
}
}
}
}