Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Commit

Permalink
#3 build bitcoin stream processor docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
hleb-albau committed Sep 25, 2017
1 parent c9a9b26 commit 9a79eab
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
33 changes: 27 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ defaults:

jobs:

build_connectors:
build_project:
<<: *default_container
steps:
- checkout
- restore_cache:
keys:
- connectors-dependencies-{{ checksum "build.gradle" }}
- connectors-dependencies
- project-dependencies-{{ checksum "build.gradle" }}
- project-dependencies
paths:
- ~/.gradle/caches/
- ~/.gradle/wrapper/
- run:
name: Test and build kafka-connectors project
command: ./gradlew clean build
- save_cache:
key: connectors-dependencies-{{ checksum "build.gradle" }}
key: project-dependencies-{{ checksum "build.gradle" }}
paths:
- ~/.gradle/caches/
- ~/.gradle/wrapper/
Expand All @@ -56,16 +56,37 @@ jobs:
docker push cybernode/cn-kafka-connectors:latest
deploy_bitcoin_processor_image:
<<: *default_container
steps:
- checkout
- setup_remote_docker:
version: 17.05.0-ce
- run:
name: Build kafka-streams processor for bitcoin
command: |
docker build -t build/cs-bitcoin-processor -f ./devops/stream-processing/bitcoin ./
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag build/cs-bitcoin-processor cybernode/cs-bitcoin-processor:$CIRCLE_TAG
docker push cybernode/cs-bitcoin-processor:$CIRCLE_TAG
docker tag build/cs-bitcoin-processor cybernode/cs-bitcoin-processor:latest
docker push cybernode/cs-bitcoin-processor:latest
workflows:
version: 2

kafka-connectors_build:
jobs:
- build_connectors:
- build_project:
filters:
tags:
only: /.*/
- deploy_connectors_image:
<<: *release_filter
requires:
- build_connectors
- build_project
- deploy_bitcoin_processor_image:
<<: *release_filter
requires:
- build_project
5 changes: 5 additions & 0 deletions devops/stream-processing/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# decrease size of build context
/.git
/.gradle
/.idea
**/build
11 changes: 11 additions & 0 deletions devops/stream-processing/bitcoin
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Build Stage
FROM openjdk:8u131-jdk AS build
COPY ./ /cs
WORKDIR /cs
RUN ./gradlew clean :stream-processing/bitcoin:installDist

# Container with application
FROM openjdk:8u131-jre-alpine
VOLUME /cyberdata
COPY --from=build /cs/stream-processing/bitcoin/build/install/stream-processing/bitcoin /cyberapp
ENTRYPOINT ["/cyberapp/bin/bitcoin"]

0 comments on commit 9a79eab

Please sign in to comment.