mirror of
https://github.com/valitydev/dominant.git
synced 2024-11-06 02:25:17 +00:00
Drop proprietary CI stuff
This commit is contained in:
parent
bba8599767
commit
2d9e68af5f
@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
cat <<EOF
|
|
||||||
FROM $BASE_IMAGE
|
|
||||||
MAINTAINER Igor Savchuk <i.savchuk@rbkmoney.com>
|
|
||||||
COPY _build/prod/rel/dominant /opt/dominant
|
|
||||||
CMD /opt/dominant/bin/dominant foreground
|
|
||||||
EXPOSE 8022
|
|
||||||
# A bit of magic below to get a proper branch name
|
|
||||||
# even when the HEAD is detached (Hey Jenkins!
|
|
||||||
# BRANCH_NAME is available in Jenkins env).
|
|
||||||
LABEL com.rbkmoney.$SERVICE_NAME.parent=$BASE_IMAGE_NAME \
|
|
||||||
com.rbkmoney.$SERVICE_NAME.parent_tag=$BASE_IMAGE_TAG \
|
|
||||||
com.rbkmoney.$SERVICE_NAME.build_img=build \
|
|
||||||
com.rbkmoney.$SERVICE_NAME.build_img_tag=$BUILD_IMAGE_TAG \
|
|
||||||
com.rbkmoney.$SERVICE_NAME.commit_id=$(git rev-parse HEAD) \
|
|
||||||
com.rbkmoney.$SERVICE_NAME.commit_num=$(git rev-list --count HEAD) \
|
|
||||||
com.rbkmoney.$SERVICE_NAME.branch=$( \
|
|
||||||
if [ "HEAD" != $(git rev-parse --abbrev-ref HEAD) ]; then \
|
|
||||||
echo $(git rev-parse --abbrev-ref HEAD); \
|
|
||||||
elif [ -n "$BRANCH_NAME" ]; then \
|
|
||||||
echo $BRANCH_NAME; \
|
|
||||||
else \
|
|
||||||
echo $(git name-rev --name-only HEAD); \
|
|
||||||
fi)
|
|
||||||
WORKDIR /opt/dominant
|
|
||||||
EOF
|
|
||||||
|
|
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
@ -1,22 +0,0 @@
|
|||||||
#!groovy
|
|
||||||
// -*- mode: groovy -*-
|
|
||||||
|
|
||||||
def finalHook = {
|
|
||||||
runStage('store CT logs') {
|
|
||||||
archive '_build/test/logs/'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
build('dominant', 'docker-host', finalHook) {
|
|
||||||
checkoutRepo()
|
|
||||||
loadBuildUtils()
|
|
||||||
|
|
||||||
def pipeErlangService
|
|
||||||
runStage('load pipeline') {
|
|
||||||
env.JENKINS_LIB = "build_utils/jenkins_lib"
|
|
||||||
env.SH_TOOLS = "build_utils/sh"
|
|
||||||
pipeErlangService = load("${env.JENKINS_LIB}/pipeErlangService.groovy")
|
|
||||||
}
|
|
||||||
|
|
||||||
pipeErlangService.runPipe(true, true)
|
|
||||||
}
|
|
70
Makefile
70
Makefile
@ -1,70 +0,0 @@
|
|||||||
REBAR := $(shell which rebar3 2>/dev/null || which ./rebar3)
|
|
||||||
SUBMODULES = build_utils
|
|
||||||
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
|
|
||||||
|
|
||||||
UTILS_PATH := build_utils
|
|
||||||
TEMPLATES_PATH := .
|
|
||||||
|
|
||||||
# Name of the service
|
|
||||||
SERVICE_NAME := dominant
|
|
||||||
# Service image default tag
|
|
||||||
SERVICE_IMAGE_TAG ?= $(shell git rev-parse HEAD)
|
|
||||||
# The tag for service image to be pushed with
|
|
||||||
SERVICE_IMAGE_PUSH_TAG ?= $(SERVICE_IMAGE_TAG)
|
|
||||||
|
|
||||||
# Base image for the service
|
|
||||||
BASE_IMAGE_NAME := service-erlang
|
|
||||||
BASE_IMAGE_TAG := ef20e2ec1cb1528e9214bdeb862b15478950d5cd
|
|
||||||
|
|
||||||
# Build image tag to be used
|
|
||||||
BUILD_IMAGE_NAME := build-erlang
|
|
||||||
BUILD_IMAGE_TAG := aaa79c2d6b597f93f5f8b724eecfc31ec2e2a23b
|
|
||||||
|
|
||||||
CALL_ANYWHERE := all submodules compile xref lint dialyze release clean distclean check_format format
|
|
||||||
|
|
||||||
CALL_W_CONTAINER := $(CALL_ANYWHERE) test
|
|
||||||
|
|
||||||
all: compile
|
|
||||||
|
|
||||||
-include $(UTILS_PATH)/make_lib/utils_container.mk
|
|
||||||
-include $(UTILS_PATH)/make_lib/utils_image.mk
|
|
||||||
|
|
||||||
.PHONY: $(CALL_W_CONTAINER)
|
|
||||||
|
|
||||||
# CALL_ANYWHERE
|
|
||||||
$(SUBTARGETS): %/.git: %
|
|
||||||
git submodule update --init $<
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
submodules: $(SUBTARGETS)
|
|
||||||
|
|
||||||
compile: submodules
|
|
||||||
$(REBAR) compile
|
|
||||||
|
|
||||||
xref: submodules
|
|
||||||
$(REBAR) xref
|
|
||||||
|
|
||||||
lint:
|
|
||||||
elvis -V rock
|
|
||||||
|
|
||||||
check_format:
|
|
||||||
$(REBAR) fmt -c
|
|
||||||
|
|
||||||
format:
|
|
||||||
$(REBAR) fmt -w
|
|
||||||
|
|
||||||
dialyze:
|
|
||||||
$(REBAR) dialyzer
|
|
||||||
|
|
||||||
release: submodules distclean
|
|
||||||
$(REBAR) as prod release
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(REBAR) clean
|
|
||||||
|
|
||||||
distclean:
|
|
||||||
rm -rf _build
|
|
||||||
|
|
||||||
# CALL_W_CONTAINER
|
|
||||||
test: submodules
|
|
||||||
$(REBAR) ct
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit be44d69fc87b22a0bb82d98d6eae7658d1647f98
|
|
@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
cat <<EOF
|
|
||||||
version: '2.1'
|
|
||||||
services:
|
|
||||||
|
|
||||||
${SERVICE_NAME}:
|
|
||||||
image: ${BUILD_IMAGE}
|
|
||||||
volumes:
|
|
||||||
- .:$PWD
|
|
||||||
- $HOME/.cache:/home/$UNAME/.cache
|
|
||||||
working_dir: $PWD
|
|
||||||
command: /sbin/init
|
|
||||||
depends_on:
|
|
||||||
machinegun:
|
|
||||||
condition: service_healthy
|
|
||||||
|
|
||||||
machinegun:
|
|
||||||
image: dr2.rbkmoney.com/rbkmoney/machinegun:9c3248a68fe530d23a8266057a40a1a339a161b8
|
|
||||||
command: /opt/machinegun/bin/machinegun foreground
|
|
||||||
volumes:
|
|
||||||
- ./test/machinegun/config.yaml:/opt/machinegun/etc/config.yaml
|
|
||||||
- ./test/machinegun/cookie:/opt/machinegun/etc/cookie
|
|
||||||
healthcheck:
|
|
||||||
test: "curl http://localhost:8022/"
|
|
||||||
interval: 5s
|
|
||||||
timeout: 1s
|
|
||||||
retries: 20
|
|
||||||
EOF
|
|
Loading…
Reference in New Issue
Block a user