Skip to content

Commit 1ac6ed4

Browse files
committed
Add CI
1 parent 1243a6e commit 1ac6ed4

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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` \

jenkins-vars.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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=''

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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` \

root/app/updater.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import time
1010
import yaml
1111

12+
CI = os.environ.get("CI", None)
1213
INVALIDATE_HOURS = int(os.environ.get("INVALIDATE_HOURS", "24"))
1314
PAT = os.environ.get("PAT", None)
1415

@@ -51,7 +52,7 @@ def get_state():
5152

5253
def 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")

0 commit comments

Comments
 (0)