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: 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