forked from mczgithub-lab/sparrow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
56 lines (54 loc) · 1.33 KB
/
buildspec.yml
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
version: 0.2
#env:
# variables:
# JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64"
# parameter-store:
# LOGIN_PASSWORD: /CodeBuild/dockerLoginPassword
phases:
install:
runtime-versions:
docker: 18
commands:
- echo Entered the install phase...
# - apt-get update -y
# - apt-get install -y maven
- npm install
finally:
- echo This always runs even if the update or install command fails
pre_build:
commands:
- echo Entered the pre_build phase...
## - npm test
- rm -rf node_modules
# - docker login –u User –p $LOGIN_PASSWORD
finally:
- echo This always runs even if the login command fails
build:
commands:
- echo Entered the build phase...
- echo Build started on `date`
- npm install --production
# - npm run build
# - mvn install
finally:
- echo This always runs even if the install command fails
post_build:
commands:
- echo Entered the post_build phase...
- echo Build completed on `date`
artifacts:
files:
- '**/*'
# discard-paths: yes
# secondary-artifacts:
# artifact1:
# files:
# - target/messageUtil-1.0.jar
# discard-paths: yes
# artifact2:
# files:
# - target/messageUtil-1.0.jar
# discard-paths: yes
#cache:
# paths:
# - '/root/.m2/**/*'