2023-05-14 22:15:34 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: kubernetes
|
2023-05-14 22:17:45 +01:00
|
|
|
name: crowdin
|
2023-05-15 11:57:18 +01:00
|
|
|
concurrency:
|
|
|
|
limit: 1
|
2023-05-15 11:58:32 +01:00
|
|
|
trigger:
|
|
|
|
branch: ["main"]
|
2023-05-14 22:15:34 +01:00
|
|
|
metadata:
|
|
|
|
namespace: git
|
|
|
|
steps:
|
2023-05-15 10:54:06 +01:00
|
|
|
- name: Push/Pull translations
|
2023-05-14 22:36:54 +01:00
|
|
|
image: node:current-bullseye
|
2023-05-15 11:16:47 +01:00
|
|
|
volumes:
|
|
|
|
- name: cache
|
2023-05-15 11:20:35 +01:00
|
|
|
path: /cache
|
2023-05-15 10:29:55 +01:00
|
|
|
environment:
|
2023-05-15 11:20:35 +01:00
|
|
|
YARN_CACHE_FOLDER: /cache/.yarn-translations
|
2023-05-15 10:29:55 +01:00
|
|
|
TOKEN:
|
|
|
|
from_secret: drone_gitea
|
2023-05-15 10:54:06 +01:00
|
|
|
CTOKEN:
|
|
|
|
from_secret: crowdin_token
|
2023-05-14 22:36:54 +01:00
|
|
|
commands:
|
2023-05-15 10:44:51 +01:00
|
|
|
- git config --global user.email drone@v0l.io
|
|
|
|
- git config --global user.name "Drone CI"
|
2023-05-15 10:35:48 +01:00
|
|
|
- git remote set-url origin https://drone:$TOKEN@git.v0l.io/Kieran/snort.git
|
2023-05-15 10:54:06 +01:00
|
|
|
- yarn install
|
2023-05-17 10:47:09 +01:00
|
|
|
- npx @crowdin/cli upload sources -b main -T $CTOKEN
|
2023-05-15 10:54:06 +01:00
|
|
|
- npx @crowdin/cli pull -b main -T $CTOKEN
|
|
|
|
- yarn workspace @snort/app format
|
2023-05-15 11:11:45 +01:00
|
|
|
- git add .
|
2023-05-23 22:47:01 +01:00
|
|
|
- 'git commit -a -m "chore: Update translations"'
|
2023-05-23 22:48:38 +01:00
|
|
|
- git push -u origin main
|
2023-05-15 11:16:47 +01:00
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
claim:
|
|
|
|
name: docker-cache
|
2023-05-14 22:15:34 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: kubernetes
|
2023-05-14 22:17:45 +01:00
|
|
|
name: docker
|
2023-05-15 11:57:18 +01:00
|
|
|
concurrency:
|
|
|
|
limit: 1
|
2023-05-15 11:58:32 +01:00
|
|
|
trigger:
|
|
|
|
branch: ["main"]
|
2023-05-14 22:15:34 +01:00
|
|
|
metadata:
|
|
|
|
namespace: git
|
|
|
|
steps:
|
2023-05-17 11:19:51 +01:00
|
|
|
- name: Build site
|
|
|
|
image: node:current-bullseye
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /cache
|
|
|
|
environment:
|
|
|
|
YARN_CACHE_FOLDER: /cache/.yarn-docker
|
|
|
|
commands:
|
|
|
|
- yarn install
|
|
|
|
- yarn build
|
2023-05-14 22:15:34 +01:00
|
|
|
- name: build docker image
|
|
|
|
image: r.j3ss.co/img
|
|
|
|
privileged: true
|
2023-05-14 22:26:57 +01:00
|
|
|
volumes:
|
|
|
|
- name: cache
|
2023-05-15 11:20:35 +01:00
|
|
|
path: /cache
|
2023-05-14 22:15:34 +01:00
|
|
|
environment:
|
|
|
|
TOKEN:
|
|
|
|
from_secret: img_token
|
|
|
|
commands:
|
|
|
|
- img login -u kieran -p $TOKEN git.v0l.io
|
2023-05-15 10:15:12 +01:00
|
|
|
- |-
|
|
|
|
img build -t git.v0l.io/kieran/snort:latest \
|
2023-05-14 22:26:57 +01:00
|
|
|
--platform linux/amd64,linux/arm64 \
|
2023-05-17 11:19:51 +01:00
|
|
|
-f Dockerfile.prebuilt .
|
2023-05-14 22:26:57 +01:00
|
|
|
- img push git.v0l.io/kieran/snort:latest
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
claim:
|
2023-05-14 22:52:37 +01:00
|
|
|
name: docker-cache
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: kubernetes
|
2023-06-16 09:55:38 +01:00
|
|
|
name: docker-release
|
|
|
|
concurrency:
|
|
|
|
limit: 1
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
metadata:
|
|
|
|
namespace: git
|
|
|
|
steps:
|
|
|
|
- name: Build site
|
|
|
|
image: node:current-bullseye
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /cache
|
|
|
|
environment:
|
|
|
|
YARN_CACHE_FOLDER: /cache/.yarn-docker-release
|
|
|
|
commands:
|
|
|
|
- yarn install
|
|
|
|
- yarn build
|
|
|
|
- name: build docker image
|
|
|
|
image: r.j3ss.co/img
|
|
|
|
privileged: true
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /cache
|
|
|
|
environment:
|
|
|
|
TOKEN:
|
|
|
|
from_secret: img_token
|
|
|
|
commands:
|
|
|
|
- img login -u kieran -p $TOKEN git.v0l.io
|
|
|
|
- |-
|
|
|
|
img build -t git.v0l.io/kieran/snort:${DRONE_TAG} \
|
|
|
|
--platform linux/amd64,linux/arm64 \
|
|
|
|
-f Dockerfile.prebuilt .
|
2023-06-16 12:10:31 +01:00
|
|
|
- img push git.v0l.io/kieran/snort:${DRONE_TAG}
|
2023-06-16 09:55:38 +01:00
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
claim:
|
|
|
|
name: docker-cache
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: kubernetes
|
2023-05-14 22:52:37 +01:00
|
|
|
name: test-lint
|
2023-05-15 11:57:18 +01:00
|
|
|
concurrency:
|
|
|
|
limit: 1
|
2023-05-14 22:52:37 +01:00
|
|
|
metadata:
|
|
|
|
namespace: git
|
|
|
|
steps:
|
|
|
|
- name: Test/Lint
|
|
|
|
image: node:current-bullseye
|
2023-05-15 11:16:47 +01:00
|
|
|
volumes:
|
|
|
|
- name: cache
|
2023-05-15 11:20:35 +01:00
|
|
|
path: /cache
|
2023-05-15 11:16:47 +01:00
|
|
|
environment:
|
2023-05-15 11:20:35 +01:00
|
|
|
YARN_CACHE_FOLDER: /cache/.yarn-test
|
2023-05-14 22:52:37 +01:00
|
|
|
commands:
|
|
|
|
- yarn install
|
2023-06-16 09:55:38 +01:00
|
|
|
- yarn build
|
|
|
|
- yarn test
|
2023-05-14 22:52:37 +01:00
|
|
|
- yarn workspace @snort/app eslint
|
2023-05-15 11:16:47 +01:00
|
|
|
- yarn workspace @snort/app prettier --check .
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
claim:
|
|
|
|
name: docker-cache
|