Add ci pipeline, doesn't really work because of oauth.
This commit is contained in:
parent
0ed37ad83e
commit
f6d97fe790
1 changed files with 48 additions and 0 deletions
48
ci/pipeline.yaml
Normal file
48
ci/pipeline.yaml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
---
|
||||||
|
resources:
|
||||||
|
- name: every-day
|
||||||
|
type: time
|
||||||
|
source:
|
||||||
|
interval: 24h
|
||||||
|
|
||||||
|
- name: script
|
||||||
|
type: git
|
||||||
|
source:
|
||||||
|
uri: https://gitea.redxef.at/redxef/wp-cal-integration
|
||||||
|
branch: test
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- name: update-calendar
|
||||||
|
plan:
|
||||||
|
- get: every-day
|
||||||
|
trigger: true
|
||||||
|
- get: script
|
||||||
|
- task: run-update
|
||||||
|
config:
|
||||||
|
platform: linux
|
||||||
|
image_resource:
|
||||||
|
type: registry-image
|
||||||
|
source:
|
||||||
|
repository: alpine
|
||||||
|
inputs:
|
||||||
|
- name: script
|
||||||
|
path: .
|
||||||
|
params:
|
||||||
|
VAULT_TOKEN: ((vault_token.token))
|
||||||
|
run:
|
||||||
|
path: sh
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
apk --no-cache --update add \
|
||||||
|
libcap vault jq \
|
||||||
|
python3 py3-pip py3-yaml \
|
||||||
|
py3-google-api-python-client \
|
||||||
|
py3-google-auth-httplib2 \
|
||||||
|
&& python3 -m pip install google-auth-oauthlib
|
||||||
|
setcap cap_ipc_lock= "$(command -v vault)"
|
||||||
|
vault read -address https://vault.redxef.at -format json secret/data/scouts/google/website/wp-cal-integration \
|
||||||
|
| jq .data.data \
|
||||||
|
| ./main.py
|
Loading…
Reference in a new issue