File tree Expand file tree Collapse file tree 5 files changed +8
-5
lines changed
Expand file tree Collapse file tree 5 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ pipeline {
2828 PR_DOCKERHUB_IMAGE = ' lspipepr/lsio-api'
2929 DIST_IMAGE = ' alpine'
3030 MULTIARCH = ' true'
31- CI = ' false '
31+ CI = ' true '
3232 CI_WEB = ' false'
3333 CI_PORT = ' 5000'
3434 CI_SSL = ' false'
3535 CI_DELAY = ' 30'
36- CI_DOCKERENV = ' '
36+ CI_DOCKERENV = ' CI=1 '
3737 CI_AUTH = ' '
3838 CI_WEBPATH = ' '
3939 }
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ docker run -d \
3131-e PUID=1000 \
3232-e PGID=1000 \
3333-e TZ=Etc/UTC \
34+ -e CI=0 `#optional` \
3435-e DB_FILE=/config/api.db `#optional` \
3536-e INVALIDATE_HOURS=24 `#optional` \
3637-e PAT=token `#optional` \
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ repo_vars:
1616 - PR_DOCKERHUB_IMAGE = 'lspipepr/lsio-api'
1717 - DIST_IMAGE = 'alpine'
1818 - MULTIARCH='true'
19- - CI='false '
19+ - CI='true '
2020 - CI_WEB='false'
2121 - CI_PORT='5000'
2222 - CI_SSL='false'
2323 - CI_DELAY='30'
24- - CI_DOCKERENV=''
24+ - CI_DOCKERENV='CI=1 '
2525 - CI_AUTH=''
2626 - CI_WEBPATH=''
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ full_custom_readme: |
3636 -e PUID=1000 \
3737 -e PGID=1000 \
3838 -e TZ=Etc/UTC \
39+ -e CI=0 `#optional` \
3940 -e DB_FILE=/config/api.db `#optional` \
4041 -e INVALIDATE_HOURS=24 `#optional` \
4142 -e PAT=token `#optional` \
Original file line number Diff line number Diff line change 99import time
1010import yaml
1111
12+ CI = os .environ .get ("CI" , None )
1213INVALIDATE_HOURS = int (os .environ .get ("INVALIDATE_HOURS" , "24" ))
1314PAT = os .environ .get ("PAT" , None )
1415
@@ -51,7 +52,7 @@ def get_state():
5152
5253def update_images ():
5354 with KeyValueStore (invalidate_hours = INVALIDATE_HOURS , readonly = False ) as kv :
54- if "images" in kv :
55+ if "images" in kv or CI == "1" :
5556 print (f"{ datetime .datetime .now ()} - skipped - already updated" )
5657 return
5758 print (f"{ datetime .datetime .now ()} - updating images" )
You can’t perform that action at this time.
0 commit comments