-
Notifications
You must be signed in to change notification settings - Fork 50
/
Jenkinsfile
66 lines (65 loc) · 1.82 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
properties([
parameters([
string(name: 'PLUG_KEY', defaultValue: ''),
// string(name: 'SERVERID', defaultValue: 'BQX9-6FJT-S0YH-ZCO1'),
choice(name: 'APP', choices: ['Jira', 'Confluence', 'Bitbucket'])
])
])
pipeline {
agent {
docker {
image 'php:8.0.5'
args '-u 0'
}
}
stages {
stage('Get key for Jira') {
when {
expression { params.APP == 'Jira' }
}
steps {
sh 'echo "Jira plugin"'
//sh 'printenv'
sh '''#!/bin/bash
sed -i "s/com.gliffy.integration.jira/"$PLUG_KEY"/g" license_key_gliffy_jira.txt
sed -i "s/ServerID=BQX9-6FJT-S0YH-ZCO1/ServerID=BQX9-6FJT-S0YH-ZCO1/g" license_key_gliffy_jira.txt
cat license_key_gliffy_jira.txt
chmod +x atlassian-keygen.php
./atlassian-keygen.php -e license_key_gliffy_jira.txt
'''
}
}
stage('Get key for Confluence') {
when {
expression { params.APP == 'Confluence' }
}
steps {
sh 'echo "Confluence plugin"'
//sh 'printenv'
sh '''#!/bin/bash
sed -i "s/com.gliffy.integration.jira/"$PLUG_KEY"/g" license_key_gliffy_confluence.txt
sed -i "s/ServerID=BQX9-6FJT-S0YH-ZCO1/ServerID=B1Y3-1R40-C2Z4-516N/g" license_key_gliffy_confluence.txt
cat license_key_gliffy_confluence.txt
chmod +x atlassian-keygen.php
./atlassian-keygen.php -e license_key_gliffy_confluence.txt
'''
}
}
stage('Get key for Bitbucket') {
when {
expression { params.APP == 'Bitbucket' }
}
steps {
sh 'echo "Bitbucket plugin"'
//sh 'printenv'
sh '''#!/bin/bash
sed -i "s/com.gliffy.integration.jira/"$PLUG_KEY"/g" license_key_gliffy_jira.txt
sed -i "s/ServerID=BQX9-6FJT-S0YH-ZCO1/ServerID=BT1U-OG2F-97JH-Y6YO/g" license_key_gliffy_jira.txt
cat license_key_gliffy_jira.txt
chmod +x atlassian-keygen.php
./atlassian-keygen.php -e license_key_gliffy_jira.txt
'''
}
}
}
}