-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
44 lines (38 loc) · 1.62 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
# This is a sample build configuration for Docker.
# Check our guides at https://confluence.atlassian.com/x/O1toN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
# image: atlassian/default-image:latest
# enable Docker for your repository
options:
docker: true
pipelines:
tags: # add the 'tags' section
release-*:
- step:
image: node:14.15.5
script:
# Build assets
- npm install
- ./node_modules/.bin/gulp --production
artifacts:
- public/**
- step:
image: tstrohmeier/awscli:3.6.5
script:
- export SITE_ID=_site_id_
# aws login
- eval $(aws ecr get-login --region ${AWS_DEFAULT_REGION} --no-include-email)
## Nginx
- export IMAGE_NAME=$AWS_REGISTRY_URL/$SITE_ID/front:$BITBUCKET_TAG
# build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build -t $IMAGE_NAME -f ops/build/web/Dockerfile .
# push the new Docker image to the Docker registry
- docker push $IMAGE_NAME
## PHP
- export IMAGE_NAME=$AWS_REGISTRY_URL/$SITE_ID/php:$BITBUCKET_TAG
# build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build --build-arg user=1500 -t $IMAGE_NAME -f ops/build/app/Dockerfile .
# push the new Docker image to the Docker registry
- docker push $IMAGE_NAME