forked from Makpar-Innovation-Laboratory/react-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
44 lines (37 loc) · 1.16 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
cd frontend && npm install
npm run build
aws s3 cp ./build/. \
s3://${APPLICATION}-laboratory${ENV}-web \
--recursive
pipeline {
// This line is required for declarative pipelines. Just keep it here.
agent any
// This section contains environment variables which are available for use in the
// pipeline's stages.
// environment {
// region = "us-east-1"
// }
// Here you can define one or more stages for your pipeline.
// Each stage can execute one or more steps.
stages {
// This is a stage.
stage('Build') {
steps {
// Get SHA1 of current commit
// script {
// commit_id = sh(script: "git rev-parse --short HEAD", returnStdout: true).trim()
// }
nodejs(nodeJSInstallationName: 'Node 8.0', configId: 'odos-nodejs') {
sh 'npm config ls'
sh "cd frontend && npm install"
sh "npm run build"
}
}
}
stage('Upload') {
steps {
sh "aws s3 cp ./build/. s3://jenkins-makpar-odos --recursive"
}
}
}
}