Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.
Open
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
23 changes: 16 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ stages:
- publish
- deploy-staging
- deploy
- testssh

variables:
DOCKER_HOST: tcp://docker:2375/
Expand Down Expand Up @@ -38,19 +39,27 @@ build_and_test:

build_and_publish_docker_images:
stage: publish
image: registry.gitlab.com/aelve/codesearch/ci-test-env
services:
- docker:dind
before_script:
- docker login quay.io -u $DOCKER_USER -p $DOCKER_PASS
script:
- make build-docker-core
- make build-docker-web-server
- make push-docker-core
- make push-docker-web-server
- make build-docker-core "branch=${CI_COMMIT_REF_NAME}"
- make build-docker-web-server "branch=${CI_COMMIT_REF_NAME}"
- make push-docker-core "branch=${CI_COMMIT_REF_NAME}"
- make push-docker-web-server "branch=${CI_COMMIT_REF_NAME}"
only:
- develop
- master

staging-deploy-to-swarm:
test_work_ssh:
stage: testssh
script:
- ssh root@codesearch.aelve.com "docker services ls"
only:
- hotfix-fixed-bug-with-gitlabci

staging_deploy_to_swarm:
stage: deploy-staging
script:
- ssh deployer@$STAGING_HOST "mkdir -p ~/docker && echo $DEPLOYER_PASS | sudo -S mkdir -p /mnt/vol/{portainer/data,postgresql,data,index,logs}" || true
Expand All @@ -60,7 +69,7 @@ staging-deploy-to-swarm:
only:
- develop

deploy-to-swarm:
deploy_to_swarm:
stage: deploy
script:
- ssh deployer@$HOST "mkdir -p ~/docker && echo $DEPLOYER_PASS | sudo -S mkdir -p /mnt/vol/{portainer/data,postgresql,data,index,logs}" || true
Expand Down
3 changes: 2 additions & 1 deletion docker/ci-test-env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ RUN apk --no-cache add \
curl \
wget \
ruby \
ruby-json
ruby-json \
docker


RUN go get github.com/aelve/codesearch-engine/cmd/...
Expand Down