-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
34 lines (34 loc) · 1.05 KB
/
circle.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
version: 2
executorType: docker
jobs:
build:
environment:
- IMAGE_NAME: "entria/react-native-android"
working_directory: ~/app
docker:
- image: buildpack-deps:trusty
steps:
- checkout
- run:
name: Install Docker client
command: |
set -x
VER="17.05.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
- setup_remote_docker
- run:
name: Build Docker image
command: |
docker build -t $IMAGE_NAME:latest .
- run:
name: Push Docker image
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
TAG="0.1.${CIRCLE_BUILD_NUM}"
docker login -u $DOCKERHUB_LOGIN -p $DOCKERHUB_PASS
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$TAG
docker push $IMAGE_NAME:latest
docker push $IMAGE_NAME:$TAG
fi