10a9081c68
- Introduced a new build step in the Drone CI configuration for the worker service, enabling automated Docker image creation. - Added a Dockerfile for the worker service, defining the build process and dependencies, ensuring a streamlined deployment for background tasks. - Enhanced the overall CI/CD pipeline to support the new worker service, improving the project's build and deployment capabilities.
64 lines
1.6 KiB
YAML
64 lines
1.6 KiB
YAML
################################################################################
|
|
# build
|
|
################################################################################
|
|
kind: pipeline
|
|
type: docker
|
|
name: (build dev) build form and push to artifactory
|
|
|
|
steps:
|
|
- name: build tag
|
|
image: alpine/git:2.40.1
|
|
environment:
|
|
GOOS: linux
|
|
GOARCH: amd64
|
|
CGO_ENABLED: 0
|
|
settings:
|
|
debug: true
|
|
commands:
|
|
- APP_VERSION=$(git rev-list HEAD --count --no-merges)-$DRONE_BRANCH
|
|
- echo "APP Version tags $APP_VERSION"
|
|
- echo -n "$APP_VERSION" >> .tags
|
|
- name: build web
|
|
image: plugins/docker
|
|
settings:
|
|
build_args:
|
|
- BUILD_APP=web
|
|
username: cicd
|
|
password:
|
|
from_secret: REGISTRY_PASSWORD
|
|
dockerfile: ./cmd/web/Dockerfile
|
|
repo: artifactory.ravanertebat.ir/tm/web
|
|
registry: artifactory.ravanertebat.ir
|
|
|
|
- name: build scraper
|
|
image: plugins/docker
|
|
settings:
|
|
build_args:
|
|
- BUILD_APP=scraper
|
|
username: cicd
|
|
password:
|
|
from_secret: REGISTRY_PASSWORD
|
|
dockerfile: ./cmd/scraper/Dockerfile
|
|
repo: artifactory.ravanertebat.ir/tm/scraper
|
|
registry: artifactory.ravanertebat.ir
|
|
|
|
- name: build worker
|
|
image: plugins/docker
|
|
settings:
|
|
build_args:
|
|
- BUILD_APP=worker
|
|
username: cicd
|
|
password:
|
|
from_secret: REGISTRY_PASSWORD
|
|
dockerfile: ./cmd/worker/Dockerfile
|
|
repo: artifactory.ravanertebat.ir/tm/worker
|
|
registry: artifactory.ravanertebat.ir
|
|
|
|
node:
|
|
tag: aecde-docker-runner
|
|
trigger:
|
|
branch:
|
|
- main
|
|
- develop
|
|
event:
|
|
- custom |