Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ jobs:
name: Trigger Build
command: chmod +x .circleci/trigger_build.sh && .circleci/trigger_build.sh

deploy_docker:
machine: true
steps:
- checkout
- run: |
TAG=0.1.$CIRCLE_BUILD_NUM
docker build --no-cache --build-arg GITHUB_PERSONAL_TOKEN=$GITHUB_PERSONAL_TOKEN -t bitex/compliance:$TAG docker/standalone
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
docker push bitex/compliance:$TAG

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esto crea una nueva imagen de docker cada vez que hay un build en circleci?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sí, de todas maneras lo vamos a cambiar porque es un dolor de huevos jeje


workflows:
version: 2
build:
Expand All @@ -128,5 +138,6 @@ workflows:
- notify:
requires:
- build


- deploy_docker:
requires:
- build
11 changes: 9 additions & 2 deletions docker/standalone/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# See https://vsupalov.com/build-docker-image-clone-private-repo-ssh-key/
FROM ubuntu:18.04 as checkout-compliance
RUN apt-get update && apt-get install -y git

ARG GITHUB_PERSONAL_TOKEN
RUN git clone https://$GITHUB_PERSONAL_TOKEN@github.com/bitex-la/compliance.git

FROM ubuntu:18.04

ENV RBENV_ROOT=/usr/local/rbenv
Expand Down Expand Up @@ -43,8 +50,8 @@ RUN rm -rf /usr/local/bin/rbenv-install

RUN sed -i "s|bind-address.*|skip-networking|g" /etc/mysql/mysql.conf.d/mysqld.cnf

RUN git clone https://github.com/bitex-la/compliance.git /usr/local/compliance \
&& cp /usr/local/compliance/docker/standalone/settings.yml /usr/local/compliance/config/settings.yml \
COPY --from=checkout-compliance /compliance /usr/local/compliance
RUN cp /usr/local/compliance/docker/standalone/settings.yml /usr/local/compliance/config/settings.yml \
&& cd /usr/local/compliance && bundle install --deployment --without test

RUN service mysql start \
Expand Down