Repository navigation
Expand file tree
/
Copy path.drone.yml
More file actions
64 lines (58 loc) · 1.91 KB
/
Copy path.drone.yml
File metadata and controls
64 lines (58 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
kind: pipeline
type: docker
name: test
steps:
- name: Test Node
image: satantime/puppeteer-node:26-trixie-slim
commands:
- ln -fs .env.development .env
- apt-get update && apt-get install -y curl git xz-utils chromium chromium-driver
- curl -fsSL https://get.pnpm.io/install.sh | ENV="$HOME/.bashrc" SHELL="$(which bash)" bash -
- export PNPM_HOME="$HOME/.local/share/pnpm" && export PATH="$PNPM_HOME/bin:$PATH"
- curl https://qlty.sh | sh
- pnpm install
- pnpm run test-node
- ~/.qlty/bin/qlty coverage publish .coverage/clover.xml --override-commit-sha "$DRONE_COMMIT_SHA" --override-branch "$DRONE_BRANCH" --override-build-id "$DRONE_BUILD_NUMBER"
environment:
QLTY_COVERAGE_TOKEN: qltcp_9wA53zyfwdF3cRxZ
CHROME_BINARY: /usr/bin/chromium
CHROMEDRIVER_BINARY: /usr/bin/chromedriver
- name: Test Bash
image: koalaman/shellcheck-alpine:stable
commands:
- ln -fs .env.development .env
- shellcheck -x bin/*.sh
- name: Test Dockerfile
image: hadolint/hadolint:latest-alpine
commands:
- hadolint Dockerfile --ignore=DL3008 --ignore=SC2046 --ignore=SC2006
- name: Test Nginx
image: getpagespeed/gixy:v0.2.18
commands:
- gixy config/nginx/*
- name: Build Docker Container
depends_on:
- Test Node
- Test Bash
- Test Dockerfile
- Test Nginx
image: plugins/docker
settings:
repo: codemancer
tags: test
dry_run: true
- name: Deploy
depends_on:
- Build Docker Container
environment:
SSH_KEY:
from_secret: ssh_key
image: albertyw/ssh-client:4.1.12
commands:
- ssh-keyscan direct.albertyw.com >> /root/.ssh/known_hosts
- echo "$${SSH_KEY}" > /root/.ssh/id_ed25519
- chmod 600 /root/.ssh/id_ed25519
- ssh albertyw@direct.albertyw.com codemancer/bin/deploy.sh master
when:
branch:
- master