forked from paladinarcher/padawan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
55 lines (55 loc) · 2.11 KB
/
Jenkinsfile
File metadata and controls
55 lines (55 loc) · 2.11 KB
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
#!/usr/bin/env groovy
pipeline {
agent {
dockerfile {
filename "Dockerfile-jenkins-build"
args "--entrypoint=''"
}
/*
docker {
image 'golden/meteor-dev'
args '-e SRC_DIR=/var/jenkins_home/workspace/padawan-ci-beta'
}
*/
}
environment {
LC_ALL='en_US.UTF-8'
METEOR_ALLOW_SUPERUSER=true
}
stages {
stage('Unit Tests') {
steps {
echo 'Testing...'
sh 'echo "LC_ALL=en_US.UTF-8" >> /etc/environment'
sh 'echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen'
sh 'echo "LANG=en_US.UTF-8" > /etc/locale.conf'
sh 'locale-gen en_US.UTF-8'
sh 'meteor --allow-superuser remove-platform android'
sh 'meteor npm --allow-superuser install --save babel-runtime nightwatch'
sh 'meteor --allow-superuser test --once --driver-package meteortesting:mocha'
}
}
stage('Functional Tests') {
steps {
sh 'meteor --allow-superuser &'
sh 'sleep 8m'
sh 'meteor --allow-superuser npm run test-e2e'
}
}
stage('Build') {
steps {
echo "Building... ${env.JOB_NAME} ${env.BUILD_ID}"
sh 'meteor --allow-superuser build /tmp --architecture os.linux.x86_64'
}
}
stage('Deploy') {
steps {
echo 'Deploying... '
sh "ls -ltrh /tmp"
//sh "scp -o StrictHostKeyChecking=no -i /home/.ssh/rigel-alpha.pem /tmp/${env.BUILD_ID}.tar.gz ec2-user@18.218.174.233:/home/ec2-user/docker/staging/padawan.tar.gz"
sh "scp -o StrictHostKeyChecking=no -i /home/.ssh/rigel-alpha.pem `ls -1 /tmp/${env.JOB_NAME}*.tar.gz | head -n 1` ec2-user@18.218.174.233:/home/ec2-user/docker/staging/padawan.tar.gz"
sh "ssh -o StrictHostKeyChecking=no -i /home/.ssh/rigel-alpha.pem ec2-user@18.218.174.233 /home/ec2-user/bin/staging-rebuild-up.sh"
}
}
}
}