Change pipeline for new method.
This commit is contained in:
parent
df0beec957
commit
3b8ff2d331
1 changed files with 8 additions and 16 deletions
|
@ -1,21 +1,20 @@
|
||||||
---
|
---
|
||||||
resources:
|
resources:
|
||||||
- name: every-day
|
- name: every-hour
|
||||||
type: time
|
type: time
|
||||||
source:
|
source:
|
||||||
interval: 24h
|
interval: 1h
|
||||||
|
|
||||||
- name: script
|
- name: script
|
||||||
type: git
|
type: git
|
||||||
source:
|
source:
|
||||||
uri: https://gitea.redxef.at/redxef/wp-cal-integration
|
uri: https://gitea.redxef.at/redxef/wp-cal-integration
|
||||||
branch: test
|
branch: master
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- name: update-calendar
|
- name: update-calendar
|
||||||
plan:
|
plan:
|
||||||
- get: every-day
|
- get: every-hour
|
||||||
trigger: true
|
trigger: true
|
||||||
- get: script
|
- get: script
|
||||||
- task: run-update
|
- task: run-update
|
||||||
|
@ -29,20 +28,13 @@ jobs:
|
||||||
- name: script
|
- name: script
|
||||||
path: .
|
path: .
|
||||||
params:
|
params:
|
||||||
VAULT_TOKEN: ((vault_token.token))
|
configuration_json: ((configuration))
|
||||||
run:
|
run:
|
||||||
path: sh
|
path: sh
|
||||||
args:
|
args:
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
apk --no-cache --update add \
|
apk --no-cache --update add libcap jq python3 py3-pip
|
||||||
libcap vault jq \
|
python3 -m pip install --requirement requirements.txt
|
||||||
python3 py3-pip py3-yaml \
|
echo "$configuration_json" | ./main.py -c -
|
||||||
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