-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
42 lines (37 loc) · 871 Bytes
/
.gitlab-ci.yml
File metadata and controls
42 lines (37 loc) · 871 Bytes
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
# Base docker image to run pipeline
image: docker:latest
services:
- docker:dind
# path to cache Maven dependencies
cache:
paths:
- .m2/
# Stages in pipeline
stages:
- build
- deploy
# Build maven step
maven-build:
# Use maven docker image
image: maven
# Join to build stage
stage: build
# Command to execute in docker image
script: "mvn package -Dmaven.repo.local=.m2"
artifacts:
paths:
- target/*.jar
# Deploy AWS step
aws-deploy:
# Use aws docker with eb-cli
image: chriscamicas/awscli-awsebcli
# Join to deploy stage
stage: deploy
# Commands to execute to deploy application to AWS
script:
- echo "$AWS_ACCESS_KEY_ID"
- eb init continuous-deployment-demo -p "corretto-17" --region "ca-central-1"
- eb create gitlab-env --single || true
- eb setenv SERVER_PORT=5000
- eb deploy gitlab-env
- eb status