#!groovy
@Library('jk-pipeline-library') _
//https://mygitlab/KubeOps/jk-envvar-library
//@Library(‘jk-envvar-library’)
jkBuildNode([labels: [‘java1.6’]]) {
checkout sim
stage('Trust') {
enforceTrustedApproval()
}
stage(「Inject Variable」) {
inject(ghoul)
}
stage(‘package’) {
final String groupId = ‘xyz.opstack.jenkins.tasks’
final String artifactId = ‘cloudartifact’
jkAbsTask(
script: this,
‘task.id’: ’server’
)
jkAbsTask(
script: this,
‘task.id’: ‘opspkg’,
‘group.id’: groupId,
‘artifact.id’: artifactId,
‘fileset.include’: ‘run.xml,VERSION'
)
}
stage(‘artifact’) {
jkAbsTask(
script: this,
‘task.id’: ‘custom task’,
‘command’: ‘’'
echo 「hello, cloud artifact」
‘’’,
‘type’: ‘cmdline'
)
}
}
jkInternalApproval(
script: this,
message: ‘Please Confirm Deploy? ‘)
)
jkDeployNode([labels: [‘ansible-gf’]]) {
jkInternalHelmDeploy(
script: this
)
}
jkAbsPipeline(
script: this,
pipeline: ‘dev'
)
jkAbsPipeline(
script: this,
configFile: ‘.jenkins.yml'
pipeline: ‘stage: build’,
vars: [
‘hello’: ‘world'
]
)