Compare commits
1 Commits
lash/task-
...
sohail/ci-
| Author | SHA1 | Date | |
|---|---|---|---|
|
f3aa081510
|
@@ -1,43 +1,14 @@
|
|||||||
include:
|
default:
|
||||||
#- local: 'ci_templates/.cic-template.yml' #kaniko build templates
|
image: docker:latest
|
||||||
# these includes are app specific unit tests
|
tags:
|
||||||
- local: 'apps/cic-eth/.gitlab-ci.yml'
|
- cic-runner
|
||||||
- local: 'apps/cic-ussd/.gitlab-ci.yml'
|
|
||||||
- local: 'apps/cic-notify/.gitlab-ci.yml'
|
|
||||||
- local: 'apps/cic-meta/.gitlab-ci.yml'
|
|
||||||
- local: 'apps/cic-cache/.gitlab-ci.yml'
|
|
||||||
#- local: 'apps/contract-migration/.gitlab-ci.yml'
|
|
||||||
#- local: 'apps/data-seeding/.gitlab-ci.yml'
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- test
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/docker-with-compose:latest
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
REGISTRY: registry.gitlab.com/kamikazechaser/cic-monorepo
|
||||||
DOCKER_BUILDKIT: "1"
|
DOCKER_BUILDKIT: "1"
|
||||||
COMPOSE_DOCKER_CLI_BUILD: "1"
|
|
||||||
CI_DEBUG_TRACE: "true"
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
|
|
||||||
# runs on protected branches and pushes to repo
|
include:
|
||||||
build-push:
|
- local: 'apps/cic-eth/.gitlab-ci.yml'
|
||||||
stage: build
|
|
||||||
tags:
|
|
||||||
- integration
|
|
||||||
#script:
|
|
||||||
# - TAG=$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA sh ./scripts/build-push.sh
|
|
||||||
script:
|
|
||||||
- TAG=latest sh ./scripts/build-push.sh
|
|
||||||
rules:
|
|
||||||
- if: $CI_COMMIT_REF_PROTECTED == "true"
|
|
||||||
when: always
|
|
||||||
|
|
||||||
deploy-dev:
|
|
||||||
stage: deploy
|
|
||||||
trigger: grassrootseconomics/devops
|
|
||||||
when: manual
|
|
||||||
@@ -1,16 +1,33 @@
|
|||||||
build-test-cic-eth:
|
stages:
|
||||||
stage: test
|
- build-push
|
||||||
tags:
|
- test
|
||||||
- integration
|
|
||||||
variables:
|
variables:
|
||||||
APP_NAME: cic-eth
|
APP_NAME: cic-eth
|
||||||
MR_IMAGE_TAG: mr-$APP_NAME-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
|
|
||||||
|
workflow:
|
||||||
|
rules:
|
||||||
|
- changes:
|
||||||
|
- apps/$APP_NAME/**/*
|
||||||
|
|
||||||
|
cic-eth:build-push:
|
||||||
|
stage: build-push
|
||||||
script:
|
script:
|
||||||
- cd apps/cic-eth
|
- cd apps/$APP_NAME
|
||||||
- docker build -t $MR_IMAGE_TAG -f docker/Dockerfile .
|
- docker pull $REGISTRY/$APP_NAME:latest || true
|
||||||
- docker run $MR_IMAGE_TAG sh docker/run_tests.sh
|
- docker build --cache-from $REGISTRY/$APP_NAME:latest -t $REGISTRY/$APP_NAME:$CI_COMMIT_SHORT_SHA -f docker/Dockerfile .
|
||||||
|
- docker push $REGISTRY/$APP_NAME --all-tags
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "true"
|
||||||
|
|
||||||
|
cic-eth:test:
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
stage: test
|
||||||
|
needs: ["cic-eth:build-push"]
|
||||||
|
variables:
|
||||||
|
allow_failure: true
|
||||||
|
script:
|
||||||
|
- docker run $REGISTRY/$APP_NAME:$CI_COMMIT_SHORT_SHA sh docker/run_tests.sh
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
changes:
|
|
||||||
- apps/$APP_NAME/**/*
|
|
||||||
when: always
|
|
||||||
|
|||||||
@@ -203,9 +203,6 @@ def main():
|
|||||||
argv.append(config.get('CELERY_QUEUE'))
|
argv.append(config.get('CELERY_QUEUE'))
|
||||||
argv.append('-n')
|
argv.append('-n')
|
||||||
argv.append(config.get('CELERY_QUEUE'))
|
argv.append(config.get('CELERY_QUEUE'))
|
||||||
argv.append('--config')
|
|
||||||
argv.append('celeryconfig')
|
|
||||||
|
|
||||||
|
|
||||||
BaseTask.default_token_symbol = config.get('CIC_DEFAULT_TOKEN_SYMBOL')
|
BaseTask.default_token_symbol = config.get('CIC_DEFAULT_TOKEN_SYMBOL')
|
||||||
BaseTask.default_token_address = registry.by_name(BaseTask.default_token_symbol)
|
BaseTask.default_token_address = registry.by_name(BaseTask.default_token_symbol)
|
||||||
|
|||||||
4
apps/cic-eth/crypto_dev_signer_config/config.ini
Normal file
4
apps/cic-eth/crypto_dev_signer_config/config.ini
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[signer]
|
||||||
|
secret = deadbeef
|
||||||
|
#database = crypto-dev-signer
|
||||||
|
socket_path = ipc:///run/crypto-dev-signer/jsonrpc.ipc
|
||||||
8
apps/cic-eth/crypto_dev_signer_config/database.ini
Normal file
8
apps/cic-eth/crypto_dev_signer_config/database.ini
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[database]
|
||||||
|
NAME=cic-signer
|
||||||
|
USER=
|
||||||
|
PASSWORD=
|
||||||
|
HOST=
|
||||||
|
PORT=
|
||||||
|
ENGINE=
|
||||||
|
DRIVER=
|
||||||
@@ -7,7 +7,6 @@ import json
|
|||||||
# external imports
|
# external imports
|
||||||
import celery
|
import celery
|
||||||
import confini
|
import confini
|
||||||
import celery.utils.graph
|
|
||||||
|
|
||||||
# local imports
|
# local imports
|
||||||
from cic_eth.api import Api
|
from cic_eth.api import Api
|
||||||
@@ -36,7 +35,7 @@ class Fmtr(celery.utils.graph.GraphFormatter):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
api = Api(
|
api = Api(
|
||||||
config.get('CHAIN_SPEC'),
|
config.get('CIC_CHAIN_SPEC'),
|
||||||
queue='cic-eth',
|
queue='cic-eth',
|
||||||
#callback_param='{}:{}:{}:{}'.format(args.redis_host_callback, args.redis_port_callback, redis_db, redis_channel),
|
#callback_param='{}:{}:{}:{}'.format(args.redis_host_callback, args.redis_port_callback, redis_db, redis_channel),
|
||||||
#callback_task='cic_eth.callbacks.redis.redis',
|
#callback_task='cic_eth.callbacks.redis.redis',
|
||||||
|
|||||||
Reference in New Issue
Block a user