Change pipeline for new method.

This commit is contained in:
redxef 2022-10-13 11:47:43 +02:00
parent df0beec957
commit 3b8ff2d331
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -1,21 +1,20 @@
---
resources:
- name: every-day
- name: every-hour
type: time
source:
interval: 24h
interval: 1h
- name: script
type: git
source:
uri: https://gitea.redxef.at/redxef/wp-cal-integration
branch: test
branch: master
jobs:
- name: update-calendar
plan:
- get: every-day
- get: every-hour
trigger: true
- get: script
- task: run-update
@ -29,20 +28,13 @@ jobs:
- name: script
path: .
params:
VAULT_TOKEN: ((vault_token.token))
configuration_json: ((configuration))
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
apk --no-cache --update add libcap jq python3 py3-pip
python3 -m pip install --requirement requirements.txt
echo "$configuration_json" | ./main.py -c -