-
Notifications
You must be signed in to change notification settings - Fork 5
/
Jenkinsfile
48 lines (48 loc) · 1.41 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 {
dockerfile {
label 'docker'
}
}
environment {
MBED_CLOUD_DEV_CREDENTIALS_C = credentials('${mbed-cloud-dev-credentials-c}')
UPDATE_DEFAULT_RESOURCES_C = credentials('${update-default-resources-c}')
}
stages {
stage('Setup') {
steps {
sh '''
snapcraft --version
mkdir -p ~/.ssh; chmod 0700 ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
git config --global user.email "jenkins@localhost"
git config --global user.name "Jenkins"
apt-get update
'''
}
}
stage('Build') {
steps {
sshagent(credentials: ['c9c1171e-fac3-4ec9-99cc-1f8a351e71ae']) {
sh '''
cp "${MBED_CLOUD_DEV_CREDENTIALS_C}" mbed_cloud_dev_credentials.c
cp "${UPDATE_DEFAULT_RESOURCES_C}" update_default_resources.c
snapcraft
'''
}
}
}
stage('Test') {
steps {
sh '''
./scripts/install_check.sh prime/
'''
}
}
}
post {
success {
archiveArtifacts artifacts: 'pelion-edge_*.snap', fingerprint: true
}
}
}