Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update repo configuration #195

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .drone-templates
Submodule .drone-templates added at b14fdc
135 changes: 135 additions & 0 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
local common = import '.drone-templates/common.libsonnet';
local images = import '.drone-templates/images.libsonnet';
local jsonnet = import '.drone-templates/jsonnet.libsonnet';
local renovate = import '.drone-templates/renovate.libsonnet';

local nodeImage = 'node:18-buster';

local koboPipeline = [
common.defaultPushTrigger + common.platform + {
kind: 'pipeline',
name: 'npm',
type: 'docker',
steps: [
{
name: 'set aws credentials',
image: images.debian.image + ':' + images.debian.version,
environment: {
CONFIG: {
from_secret: 'aws',
},
},
commands: [
'echo "$CONFIG" > /root/.aws/credentials',
],
volumes: [
{
name: 'aws-config',
path: '/root/.aws',
},
],
},
{
name: 'copy kobo database',
image: 'docker.io/amazon/aws-cli:2.13.15@sha256:ac2c7d3827a8fef1024357ada9c6ccd8d0ce098a85cffd6803a52bb8cb4842ed',
commands: [
'aws --endpoint-url http://100.82.97.39:9000 s3 cp s3://repo-obsidian-kobo-highlights-import/KoboReader.sqlite /drone/src/KoboReader.sqlite',
],
volumes: [
{
name: 'aws-config',
path: '/root/.aws',
},
],
},
{
name: 'install',
image: nodeImage,
volumes: [
{
name: 'node_modules',
path: '/drone/src/node_modules',
},
],
commands: [
'npm install',
],
},
{
name: 'lint',
image: nodeImage,
volumes: [
{
name: 'node_modules',
path: '/drone/src/node_modules',
},
],
commands: [
'npm run lint',
],
depends_on: [
'install',
],
},
{
name: 'test',
image: nodeImage,
volumes: [
{
name: 'node_modules',
path: '/drone/src/node_modules',
},
],
commands: [
'npm run test',
],
depends_on: [
'install',
'copy kobo database',
],
},
{
name: 'build',
image: nodeImage,
volumes: [
{
name: 'node_modules',
path: '/drone/src/node_modules',
},
],
commands: [
'npm run build',
],
depends_on: [
'install',
],
},
],
volumes: [
{
name: 'node_modules',
host: {
path: '/tmp/node_modules/kobo',
},
},
{
name: 'aws-config',
temp: {},
},
],
},
{
kind: 'secret',
name: 'aws',
get: {
path: 'secret/data/ci/aws',
name: 'credentials',
},
},
];

renovate + jsonnet + koboPipeline +
[
x[1]
for x in common.f.kv(common.secrets)
]
Loading
Loading