-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
48 lines (48 loc) · 1.37 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
pipeline {
agent any
environment {
DOCKER_REGISTRY='registry.cn-hangzhou.aliyuncs.com'
}
parameters {
string name: 'GIT_HTTP_URL', trim: true, defaultValue: 'https://github.com/seoktaehyeon/sraFramework.git'
string name: 'GIT_BRANCH_NAME', trim: true, defaultValue: 'develop'
string name: 'GIT_CRED', trim: true, defaultValue: 'sraf-devops'
string name: 'RF_CONFIG', trim: true, defaultValue: 'template.yaml'
string name: 'RF_TAG', trim: true, defaultValue: 'Demo'
}
stages {
stage('Git Clone') {
steps {
deleteDir()
checkout([
$class: 'GitSCM',
branches: [[name: "$GIT_BRANCH_NAME"]],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [[
credentialsId: "$GIT_CRED",
url: "$GIT_HTTP_URL"
]]
])
}
}
stage('Execute Test Case') {
steps {
withDockerContainer(
image: "${DOCKER_REGISTRY}/bxwill/robotframework:py-chrome-allure",
args: '--shm-size=1g'
) {
sh """
./sraf-cmd --report jenkins-allure --config config/${RF_CONFIG} --tag ${RF_TAG}
"""
}
}
post {
always {
allure includeProperties: false, results: [[path: 'output/allure-results']]
}
}
}
}
}