forked from energywebfoundation/ocn-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
35 lines (34 loc) · 1.11 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
image: alpine:latest
definitions:
steps:
- step: &build-and-test
name: Build and run tests
caches:
- gradle
- node
script:
- apk add gradle npm
- npm install -g ganache-cli
- ganache-cli -m "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat" --port 8544 --accounts 20 --networkId=9 --gasLimit=10000000 > /dev/null &
- ./gradlew build
pipelines:
default:
- step: *build-and-test
custom:
docker-image-deploy:
- variables:
- name: version
- step:
<<: *build-and-test
artifacts:
- build/**
- src/main/resources/**
- step:
name: Push to Docker Hub
script:
- docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
- docker build -t openchargingnetwork/ocn-node:${version} -t openchargingnetwork/ocn-node:latest .
- docker push openchargingnetwork/ocn-node:${version}
- docker push openchargingnetwork/ocn-node:latest
services:
- docker