-
Notifications
You must be signed in to change notification settings - Fork 9
/
jenkins.uploadcontrib
52 lines (49 loc) · 1.63 KB
/
jenkins.uploadcontrib
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
pipeline {
agent {
kubernetes {
label 'amlen-uploadcontrib-pod'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: jnlp
resources:
limits:
memory: "300Mi"
cpu: "200m"
requests:
memory: "300Mi"
cpu: "200m"
volumeMounts:
- name: volume-known-hosts
mountPath: /home/jenkins/.ssh
volumes:
- name: volume-known-hosts
configMap:
name: known-hosts
"""
}
}
parameters{
string(name: 'contributedpath', defaultValue: '', description: 'Path to file to contribute under amlen.org/contribbuilds (not used in bulk mode)')
string(name: 'buildpath', defaultValue: '', description: 'Path to build to add files to e.g. snapshots/main/20211109-2203_eclipse/centos7')
booleanParam(name: 'BulkMode', defaultValue: true, description: 'If false, gets "contributedpath", If true gets file list from the server_build/buildcontainer/bulkcontriblists dir')
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'main', name: 'branchName', type: 'PT_BRANCH', description: 'Branch to get the server_build/buildcontainer/jenkins.uploadcontrib script (and bulk file upload list) from'
}
stages {
stage('PromoteSnapshot') {
steps {
container('jnlp') {
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
df -h
pwd
bash server_build/buildcontainer/uploadcontrib.sh
'''
}
}
}
}
}
}