Compare commits
1 Commits
lash/task-
...
sohail/ci-
| Author | SHA1 | Date | |
|---|---|---|---|
|
f3aa081510
|
@@ -1,43 +1,14 @@
|
||||
include:
|
||||
#- local: 'ci_templates/.cic-template.yml' #kaniko build templates
|
||||
# these includes are app specific unit tests
|
||||
- local: 'apps/cic-eth/.gitlab-ci.yml'
|
||||
- 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
|
||||
default:
|
||||
image: docker:latest
|
||||
tags:
|
||||
- cic-runner
|
||||
|
||||
variables:
|
||||
REGISTRY: registry.gitlab.com/kamikazechaser/cic-monorepo
|
||||
DOCKER_BUILDKIT: "1"
|
||||
COMPOSE_DOCKER_CLI_BUILD: "1"
|
||||
CI_DEBUG_TRACE: "true"
|
||||
|
||||
before_script:
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
|
||||
# runs on protected branches and pushes to repo
|
||||
build-push:
|
||||
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
|
||||
include:
|
||||
- local: 'apps/cic-eth/.gitlab-ci.yml'
|
||||
@@ -1,16 +1,33 @@
|
||||
build-test-cic-eth:
|
||||
stage: test
|
||||
tags:
|
||||
- integration
|
||||
variables:
|
||||
APP_NAME: cic-eth
|
||||
MR_IMAGE_TAG: mr-$APP_NAME-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
|
||||
stages:
|
||||
- build-push
|
||||
- test
|
||||
|
||||
variables:
|
||||
APP_NAME: cic-eth
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- changes:
|
||||
- apps/$APP_NAME/**/*
|
||||
|
||||
cic-eth:build-push:
|
||||
stage: build-push
|
||||
script:
|
||||
- cd apps/cic-eth
|
||||
- docker build -t $MR_IMAGE_TAG -f docker/Dockerfile .
|
||||
- docker run $MR_IMAGE_TAG sh docker/run_tests.sh
|
||||
- cd apps/$APP_NAME
|
||||
- docker pull $REGISTRY/$APP_NAME:latest || true
|
||||
- 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:
|
||||
- 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('-n')
|
||||
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_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
|
||||
import celery
|
||||
import confini
|
||||
import celery.utils.graph
|
||||
|
||||
# local imports
|
||||
from cic_eth.api import Api
|
||||
@@ -36,7 +35,7 @@ class Fmtr(celery.utils.graph.GraphFormatter):
|
||||
|
||||
def main():
|
||||
api = Api(
|
||||
config.get('CHAIN_SPEC'),
|
||||
config.get('CIC_CHAIN_SPEC'),
|
||||
queue='cic-eth',
|
||||
#callback_param='{}:{}:{}:{}'.format(args.redis_host_callback, args.redis_port_callback, redis_db, redis_channel),
|
||||
#callback_task='cic_eth.callbacks.redis.redis',
|
||||
|
||||
Reference in New Issue
Block a user