Fix up sync-crls script and add to Dockerfile.
- Fix some python formatting and import issues - Fix dockerfile to include sync-crls script - Adjust sync-crls script to use paths and CLI tools available in the Docker container
This commit is contained in:
parent
b1cf89051a
commit
44141c002d
@ -79,6 +79,7 @@ COPY --from=builder /install/config/ ./config/
|
|||||||
COPY --from=builder /install/templates/ ./templates/
|
COPY --from=builder /install/templates/ ./templates/
|
||||||
COPY --from=builder /install/translations.yaml .
|
COPY --from=builder /install/translations.yaml .
|
||||||
COPY --from=builder /install/script/seed_roles.py ./script/seed_roles.py
|
COPY --from=builder /install/script/seed_roles.py ./script/seed_roles.py
|
||||||
|
COPY --from=builder /install/script/sync-crls ./script/sync-crls
|
||||||
COPY --from=builder /install/static/ ./static/
|
COPY --from=builder /install/static/ ./static/
|
||||||
COPY --from=builder /install/uwsgi.ini .
|
COPY --from=builder /install/uwsgi.ini .
|
||||||
COPY --from=builder /usr/local/bin/uwsgi /usr/local/bin/uwsgi
|
COPY --from=builder /usr/local/bin/uwsgi /usr/local/bin/uwsgi
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import requests
|
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pendulum
|
import pendulum
|
||||||
from html.parser import HTMLParser
|
import requests
|
||||||
|
|
||||||
MODIFIED_TIME_BUFFER = 15 * 60
|
MODIFIED_TIME_BUFFER = 15 * 60
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
apiVersion: batch/v1
|
apiVersion: batch/v1beta1
|
||||||
kind: CronJob
|
kind: CronJob
|
||||||
metadata:
|
metadata:
|
||||||
name: crls
|
name: crls
|
||||||
@ -9,14 +9,15 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
containers:
|
containers:
|
||||||
- name: crls
|
- name: crls
|
||||||
image: $CONTAINER_IMAGE
|
image: pwatat.azurecr.io/atat:8f1c8b5633ca70168837c885010e7d66d93562dc
|
||||||
command: [
|
command: [
|
||||||
"/bin/sh", "-c"
|
"/bin/sh", "-c"
|
||||||
]
|
]
|
||||||
args: [
|
args: [
|
||||||
"/opt/atat/atst/script/sync-crls"
|
"/opt/atat/atst/script/sync-crls",
|
||||||
]
|
]
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# script/sync-crls: update the DOD CRLs and place them where authnid expects them
|
# script/sync-crls: update the DOD CRLs and place them where authnid expects them
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
mkdir -p crl-tmp crls
|
mkdir -p crl-tmp crls
|
||||||
pipenv run python ./atst/domain/authnid/crl/util.py crl-tmp crls
|
# need to adjust this command
|
||||||
|
./.venv/bin/python ./atst/domain/authnid/crl/util.py crl-tmp crls
|
||||||
cp -r crl-tmp/* crls/
|
cp -r crl-tmp/* crls/
|
||||||
rm -rf crl-tmp
|
rm -rf crl-tmp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user