2021-03-12 18:02:45 +00:00
|
|
|
---
|
|
|
|
kind: secret
|
|
|
|
name: docker_username
|
|
|
|
get:
|
|
|
|
path: odit-registry-builder
|
|
|
|
name: username
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: secret
|
|
|
|
name: docker_password
|
|
|
|
get:
|
|
|
|
path: odit-registry-builder
|
|
|
|
name: password
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: secret
|
|
|
|
name: git_ssh
|
|
|
|
get:
|
|
|
|
path: odit-git-bot
|
|
|
|
name: sshkey
|
|
|
|
|
2021-04-07 16:13:00 +00:00
|
|
|
---
|
|
|
|
kind: secret
|
|
|
|
name: ci_token
|
|
|
|
get:
|
|
|
|
path: odit-ci-bot
|
|
|
|
name: apikey
|
|
|
|
|
2023-11-06 17:18:48 +00:00
|
|
|
---
|
|
|
|
kind: secret
|
|
|
|
name: npm_url
|
|
|
|
get:
|
|
|
|
path: odit-npm-cache
|
|
|
|
name: url
|
|
|
|
|
2021-01-10 17:26:11 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2021-03-10 19:07:46 +00:00
|
|
|
type: kubernetes
|
2023-02-02 09:13:04 +00:00
|
|
|
name: tests:node
|
2021-01-10 17:26:11 +00:00
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
steps:
|
|
|
|
- name: checkout pr
|
2021-03-12 19:20:46 +00:00
|
|
|
image: alpine/git
|
2021-01-10 17:26:11 +00:00
|
|
|
commands:
|
|
|
|
- git clone $DRONE_REMOTE_URL .
|
|
|
|
- git checkout $DRONE_SOURCE_BRANCH
|
|
|
|
- name: run tests
|
2023-02-02 09:13:04 +00:00
|
|
|
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
|
2021-01-10 17:26:11 +00:00
|
|
|
commands:
|
2023-11-06 17:18:48 +00:00
|
|
|
- npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
|
|
|
|
- pnpm i
|
|
|
|
- pnpm test:ci
|
|
|
|
environment:
|
|
|
|
NPM_REGISTRY_URL:
|
|
|
|
from_secret: npm_url
|
2021-01-10 17:26:11 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
|
2020-12-12 18:37:21 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2021-03-10 19:07:46 +00:00
|
|
|
type: kubernetes
|
2020-12-12 18:37:21 +00:00
|
|
|
name: build:dev
|
2021-01-13 18:22:19 +00:00
|
|
|
clone:
|
|
|
|
disable: true
|
2020-12-12 18:37:21 +00:00
|
|
|
|
|
|
|
steps:
|
2021-01-13 18:22:19 +00:00
|
|
|
- name: clone
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git clone $DRONE_REMOTE_URL .
|
|
|
|
- git checkout dev
|
2021-01-13 17:53:38 +00:00
|
|
|
- name: build dev
|
2023-02-02 09:21:19 +00:00
|
|
|
depends_on: ["clone"]
|
2023-02-02 09:15:46 +00:00
|
|
|
image: registry.odit.services/library/drone-kaniko
|
2021-01-13 17:53:38 +00:00
|
|
|
settings:
|
|
|
|
username:
|
2021-03-12 18:02:45 +00:00
|
|
|
from_secret: docker_username
|
2021-01-13 17:53:38 +00:00
|
|
|
password:
|
2021-03-12 18:02:45 +00:00
|
|
|
from_secret: docker_password
|
2023-02-02 09:15:46 +00:00
|
|
|
build_args:
|
2023-11-06 17:18:48 +00:00
|
|
|
- NPM_REGISTRY_URL:
|
|
|
|
from_secret: npm_url
|
2023-02-02 09:15:46 +00:00
|
|
|
repo: lfk/backend
|
2021-01-13 17:53:38 +00:00
|
|
|
tags:
|
|
|
|
- dev
|
2023-02-02 09:15:46 +00:00
|
|
|
cache: true
|
2021-01-13 17:53:38 +00:00
|
|
|
registry: registry.odit.services
|
2021-01-13 18:07:50 +00:00
|
|
|
|
2021-01-13 17:35:12 +00:00
|
|
|
trigger:
|
|
|
|
branch:
|
2021-01-13 18:07:50 +00:00
|
|
|
- dev
|
|
|
|
event:
|
|
|
|
- push
|
2021-01-13 17:35:12 +00:00
|
|
|
|
2020-12-12 18:37:21 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2021-03-10 19:07:46 +00:00
|
|
|
type: kubernetes
|
2020-12-12 18:37:21 +00:00
|
|
|
name: build:latest
|
2021-01-15 20:53:20 +00:00
|
|
|
clone:
|
|
|
|
disable: true
|
2020-12-12 18:37:21 +00:00
|
|
|
|
|
|
|
steps:
|
2021-01-15 20:53:20 +00:00
|
|
|
- name: clone
|
2021-03-12 19:20:46 +00:00
|
|
|
image: alpine/git
|
2021-01-15 20:53:20 +00:00
|
|
|
commands:
|
|
|
|
- git clone $DRONE_REMOTE_URL .
|
|
|
|
- git checkout dev
|
|
|
|
- git merge main
|
|
|
|
- git checkout main
|
2020-12-12 19:05:43 +00:00
|
|
|
- name: build latest
|
2023-02-02 09:21:19 +00:00
|
|
|
depends_on: ["clone"]
|
2023-02-02 09:15:46 +00:00
|
|
|
image: registry.odit.services/library/drone-kaniko
|
2020-12-12 16:48:45 +00:00
|
|
|
settings:
|
|
|
|
username:
|
2021-03-12 18:02:45 +00:00
|
|
|
from_secret: docker_username
|
2020-12-12 16:48:45 +00:00
|
|
|
password:
|
2021-03-12 18:02:45 +00:00
|
|
|
from_secret: docker_password
|
2023-02-02 09:15:46 +00:00
|
|
|
build_args:
|
2023-11-06 17:18:48 +00:00
|
|
|
- NPM_REGISTRY_URL:
|
|
|
|
from_secret: npm_url
|
2023-02-02 09:15:46 +00:00
|
|
|
repo: lfk/backend
|
2020-12-12 16:48:45 +00:00
|
|
|
tags:
|
|
|
|
- latest
|
2023-02-02 09:15:46 +00:00
|
|
|
cache: true
|
2020-12-12 16:48:45 +00:00
|
|
|
registry: registry.odit.services
|
2021-01-15 20:53:20 +00:00
|
|
|
- name: push merge to repo
|
|
|
|
depends_on: ["clone"]
|
|
|
|
image: appleboy/drone-git-push
|
|
|
|
settings:
|
|
|
|
branch: dev
|
|
|
|
commit: false
|
|
|
|
remote: git@git.odit.services:lfk/backend.git
|
|
|
|
ssh_key:
|
2021-03-12 18:02:45 +00:00
|
|
|
from_secret: git_ssh
|
2020-12-12 18:37:21 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
2021-03-10 19:07:46 +00:00
|
|
|
type: kubernetes
|
2020-12-12 18:37:21 +00:00
|
|
|
name: build:tags
|
|
|
|
|
|
|
|
steps:
|
2020-12-12 19:05:43 +00:00
|
|
|
- name: build $DRONE_TAG
|
2023-02-02 09:21:19 +00:00
|
|
|
depends_on: ["clone"]
|
2023-02-02 09:15:46 +00:00
|
|
|
image: registry.odit.services/library/drone-kaniko
|
2020-12-12 17:13:23 +00:00
|
|
|
settings:
|
|
|
|
username:
|
2021-03-12 18:02:45 +00:00
|
|
|
from_secret: docker_username
|
2020-12-12 17:13:23 +00:00
|
|
|
password:
|
2021-03-12 18:02:45 +00:00
|
|
|
from_secret: docker_password
|
2023-02-02 09:15:46 +00:00
|
|
|
build_args:
|
2023-11-06 17:18:48 +00:00
|
|
|
- NPM_REGISTRY_URL:
|
|
|
|
from_secret: npm_url
|
2023-02-02 09:15:46 +00:00
|
|
|
repo: lfk/backend
|
2020-12-12 17:13:23 +00:00
|
|
|
tags:
|
2023-02-02 09:13:04 +00:00
|
|
|
- "${DRONE_TAG}"
|
2023-02-02 09:15:46 +00:00
|
|
|
cache: true
|
2020-12-12 17:13:23 +00:00
|
|
|
registry: registry.odit.services
|
2020-12-29 13:57:00 +00:00
|
|
|
- name: trigger js lib build
|
|
|
|
image: idcooldi/drone-webhook
|
2020-12-22 14:44:00 +00:00
|
|
|
settings:
|
2020-12-29 13:57:00 +00:00
|
|
|
urls: https://ci.odit.services/api/repos/lfk/lfk-client-js/builds?SOURCE_TAG=${DRONE_TAG}
|
|
|
|
bearer:
|
2021-04-07 16:13:00 +00:00
|
|
|
from_secret: ci_token
|
2020-12-29 13:13:48 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
2023-02-02 09:13:04 +00:00
|
|
|
- tag
|