-
Notifications
You must be signed in to change notification settings - Fork 3
/
bitbucket-pipelines.yml
53 lines (51 loc) · 2.16 KB
/
bitbucket-pipelines.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
options:
docker: true
image: transentis/buildenv #python image with awscli and awsebcli installed
pipelines:
branches:
release/test:
- step:
name: 'Build zip file'
script:
- echo "Zipping files in the rest-api directory"
- cd rest-api
- zip -r application.zip .
artifacts:
- rest-api/application.zip
- step:
name: 'Deploy to development environment'
deployment: Test
script:
- echo "Deploying zip file to elasticbeanstalk"
- pipe: atlassian/aws-elasticbeanstalk-deploy:0.5.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: '$AWS_DEFAULT_REGION'
APPLICATION_NAME: '$AWS_APPLICATION_NAME'
ENVIRONMENT_NAME: '$AWS_ENVIRONMENT_NAME'
S3_BUCKET: '$AWS_S3_BUCKET'
ZIP_FILE: rest-api/application.zip
WAIT: 'true'
release/prod:
- step:
name: 'Build zip file'
script:
- cd rest-api
- zip -r application.zip .
artifacts:
- rest-api/application.zip
- step:
name: 'Deploy to production environment'
deployment: Production
script:
- pipe: atlassian/aws-elasticbeanstalk-deploy:0.5.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: '$AWS_DEFAULT_REGION'
APPLICATION_NAME: '$AWS_APPLICATION_NAME'
ENVIRONMENT_NAME: '$AWS_ENVIRONMENT_NAME'
S3_BUCKET: '$AWS_S3_BUCKET'
ZIP_FILE: rest-api/application.zip
WAIT: 'true'