-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.travis.yml
More file actions
61 lines (53 loc) · 2.2 KB
/
.travis.yml
File metadata and controls
61 lines (53 loc) · 2.2 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
56
57
58
59
60
61
language: java
jdk:
- openjdk11
branches:
only:
- main # git default 브런치를 등록한다. (ex. master)
# Travis CI 서버의 Home
cache:
directories:
- '$HOME/.m2/repository'
- '$HOME/.gradle'
script: "./gradlew clean build"
before_install:
- chmod +x gradlew
# CI 실행 완료 시 메일로 알림
notifications:
email:
recipients:
- ynhyojng@gmail.com
# deploy 전에 수행 : jar+(기타 설정 파일) .zip으로 압축
before_deploy:
- mkdir -p before-deploy # zip에 포함시킬 파일들을 담을 디렉토리 생성
- cp scripts/*.sh before-deploy/ # scripts파일 추가
- cp appspec.yml before-deploy/ # appsepc.yml 추가
- cp build/libs/*.jar before-deploy/ # build/libs 목록 추가
- cd before-deploy && zip -r before-deploy * # before-deploy로 이동 후 전체 압축
- cd ../ && mkdir -p deploy # 상위 디렉토리 이동 후 deploy 디렉토리 생성
- mv before-deploy/before-deploy.zip deploy/mummoom_deploy_test.zip # deploy로 zip파일 이동
deploy:
# S3로 파일업로드
- provider: s3
access_key_id: $AWS_ACCESS_KEY # Travis repo settings에 설정된 값
secret_access_key: $AWS_SECRET_KEY # Travis repos settings에 설정된 값
bucket: mummoom-deploy-test-build # s3 버킷
region: ap-northeast-2
skip_cleanup: true
acl: private # zip 파일 접근을 private으로
local_dir: deploy # before_deploy에서 생성한 디렉토리
wait-until-deployed: true
on:
all_branches: true # master말고 다른 모든 브런치 허용
- provider: codedeploy
access_key_id: $AWS_ACCESS_KEY # Travis repo settings에 설정된 값
secret_access_key: $AWS_SECRET_KEY # Travis repos settings에 설정된 값
bucket: mummoom-deploy-test-build # s3 버킷
key: mummoom_deploy_test.zip # 빌드 파일 압축해서 전달
bundle_type: zip # 압축 확장자
application: mummoom-deploy-test # 웹 콘솔에서 등록한 CodeDelpoy 애플리케이션 이름
deployment_group: mummoom-deploy-test-group # 웹 콘솔에서 등록한 CodeDelpoy 배포 그룹 이름
region: ap-northeast-2
wait-until-deployed: true
on:
all_branches: true # master말고 다른 모든 브런치 허용