From d5a1809733af76812a6387e7984a71b560207cbb Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Mon, 17 Jan 2022 18:52:28 +0300 Subject: [PATCH] add: gitea ci build --- .drone.yml | 28 ++++++++++++++++++++++++++++ docker-compose.build.yml | 30 +++++++++++++++--------------- 2 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..90bf399 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,28 @@ +kind: pipeline +name: default + +steps: + - name: fetch + image: alpine/git + commands: + - git fetch --tags + + - name: build + image: kamikazechaser/docker-build:latest + environment: + DOCKER_BUILDKIT: 1 + COMPOSE_DOCKER_CLI_BUILD: 1 + IMAGE_BASE_URL: docker.grassecon.net/cic-stack + PASSWORD: + from_secret: docker_password + volumes: + - name: docker_sock + path: /var/run/docker.sock + commands: + - echo $PASSWORD | docker login docker.grassecon.net --username ci --password-stdin + - TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) docker-compose -f docker-compose.build.yml build --progress plain + - docker-compose -f docker-compose.build.yml push +volumes: + - name: docker_sock + host: + path: /var/run/docker.sock diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 11e77fd..173c238 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -1,52 +1,52 @@ -version: '3.2' +version: "3.2" services: cic-cache: - image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-cache:${TAG:-latest} + image: docker.grassecon.net/cic-stack/cic-cache:${TAG:-latest} build: context: apps/cic-cache dockerfile: docker/Dockerfile cache_from: - - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-cache:latest + - docker.grassecon.net/cic-stack/cic-cache:${TAG:-latest} cic-eth: - image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-eth:${TAG:-latest} + image: docker.grassecon.net/cic-stack/cic-eth:${TAG:-latest} build: context: apps/cic-eth dockerfile: docker/Dockerfile cache_from: - - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-eth:latest + - docker.grassecon.net/cic-stack/cic-eth:${TAG:-latest} cic-meta: - image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-meta:${TAG:-latest} + image: docker.grassecon.net/cic-stack/cic-meta:${TAG:-latest} build: context: apps/cic-meta dockerfile: docker/Dockerfile cache_from: - - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-meta:latest + - docker.grassecon.net/cic-stack/cic-meta:${TAG:-latest} cic-notify: - image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-notify:${TAG:-latest} + image: docker.grassecon.net/cic-stack/cic-notify:${TAG:-latest} build: context: apps/cic-notify dockerfile: docker/Dockerfile cache_from: - - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-notify:latest + - docker.grassecon.net/cic-stack/cic-notify:${TAG:-latest} funga-eth: - image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/funga-eth:${TAG:-latest} + image: docker.grassecon.net/cic-stack/funga-eth:${TAG:-latest} build: context: apps/cic-signer dockerfile: Dockerfile cache_from: - - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/funga-eth:latest + - docker.grassecon.net/cic-stack/funga-eth:${TAG:-latest} cic-ussd: - image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-ussd:${TAG:-latest} + image: docker.grassecon.net/cic-stack/cic-ussd:${TAG:-latest} build: context: apps/cic-ussd dockerfile: docker/Dockerfile cache_from: - - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-ussd:latest + - docker.grassecon.net/cic-stack/cic-ussd:${TAG:-latest} cic-contract-bootstrap: - image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-contract-bootstrap:${TAG:-latest} + image: docker.grassecon.net/cic-stack/cic-contract-bootstrap:${TAG:-latest} build: context: apps/contract-migration dockerfile: docker/Dockerfile cache_from: - - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-ussd:latest \ No newline at end of file + - docker.grassecon.net/cic-stack/cic-ussd:${TAG:-latest}