snort/.drone.yml
Kieran 770d96d721
Some checks reported errors
continuous-integration/drone/push Build encountered an error
delete crowdin
2023-07-03 13:16:16 +01:00

105 lines
2.1 KiB
YAML

---
kind: pipeline
type: kubernetes
name: docker
concurrency:
limit: 1
trigger:
branch:
- main
metadata:
namespace: git
steps:
- name: Build site
image: node:current-bullseye
volumes:
- name: cache
path: /cache
environment:
YARN_CACHE_FOLDER: /cache/.yarn-docker
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: docker_hub
commands:
- img login -u voidic -p $TOKEN
- img build -t voidic/snort:latest --platform linux/amd64,linux/arm64 -f Dockerfile.prebuilt .
- img push voidic/snort:latest
volumes:
- name: cache
claim:
name: docker-cache
---
kind: pipeline
type: kubernetes
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: docker_hub
commands:
- img login -u voidic -p $TOKEN
- img build -t voidic/snort:${DRONE_TAG} --platform linux/amd64,linux/arm64 -f Dockerfile.prebuilt .
- img push voidic/snort:${DRONE_TAG}
volumes:
- name: cache
claim:
name: docker-cache
---
kind: pipeline
type: kubernetes
name: test-lint
concurrency:
limit: 1
metadata:
namespace: git
steps:
- name: Test/Lint
image: node:current-bullseye
volumes:
- name: cache
path: /cache
environment:
YARN_CACHE_FOLDER: /cache/.yarn-test
commands:
- yarn install
- yarn build
- yarn test
- yarn workspace @snort/app eslint
- yarn workspace @snort/app prettier --check .
volumes:
- name: cache
claim:
name: docker-cache