Compare commits

...
11 Commits
Author SHA1 Message Date
pi-ux-ce a0604758bf add caching
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
2025-06-03 10:59:57 +00:00
pi-ux-ce 2767a71e5c upgrade pip before running the pip install command
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
2025-02-17 14:06:21 +00:00
pi-ux-ce 01c3cd9d8e add more print
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 31s
2025-02-17 12:44:15 +00:00
pierre geeraert 82e33f502a try to add a try catch to validate the complete run
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 15s
2025-02-16 22:47:39 +00:00
pi-ux-ce 23da31d247 try to block the never ending creation of pod while failing
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 10s
2025-02-09 12:03:37 +00:00
pi-ux-ce 99a9fb63a6 enable backoff limit
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 11s
2024-11-11 17:15:01 +00:00
pi-ux-ce cae1fab1f6 rename Dockerfile to dockerfile
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9m47s
2024-11-11 10:06:55 +00:00
pi-ux-ce a4376d499f Merge branch 'main' of https://gitea.tryton.geeraert.eu/pi-ux-ce/dyndns_python
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 19s
2024-11-11 10:05:13 +00:00
pi-ux-ce bfd91178e1 commit just to trigger actiosn 2024-11-11 10:04:58 +00:00
pi-ux-ce 73f92406c6 change the image tag to latest
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
2024-11-04 09:16:03 +00:00
pi-ux-ce 144d36dfad change the registry path
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
2024-11-04 09:14:40 +00:00
4 changed files with 16 additions and 15 deletions
+2
View File
@@ -35,6 +35,8 @@ jobs:
with:
push: true
tags: gitea.tryton.geeraert.eu/pi-ux-ce/dyndns_python:latest
cache-from: type=registry,ref=gitea.tryton.geeraert.eu/pi-ux-ce/dyndns_python:buildcache
cache-to: type=registry,ref=gitea.tryton.geeraert.eu/pi-ux-ce/dyndns_python:buildcache,mode=max
- run: echo "🍏 This job's status is ${{ job.status }}."
+4 -14
View File
@@ -5,16 +5,6 @@ metadata:
---
apiVersion: batch/v1
kind: CronJob
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchFields:
- key: metadata.name
operator: In
values:
- kube-master
metadata:
name: dyndns-pythonrenew
namespace: dyndns-python
@@ -23,12 +13,12 @@ spec:
jobTemplate:
spec:
ttlSecondsAfterFinished: 100
backoffLimit: 4
template:
spec:
# nodeName: kube-master
containers:
- name: dyndns-python
# image: dyndns_python:latest
image: localhost:31795/dyndns_python
restartPolicy: Never
image: gitea.tryton.geeraert.eu/pi-ux-ce/dyndns_python:latest
imagePullPolicy: IfNotPresent
restartPolicy: OnFailure
+8 -1
View File
@@ -30,15 +30,22 @@ def update_zone(subdomain,new_ip,domain_id):
result = client.put('/domain/zone/'+new_domain+'/dynHost/record/'+domain_id,
ip=new_ip,
subDomain=subdomain)
print("Zone updated")
refresh_dns()
return result
def refresh_dns():
result_refresh = client.post('/domain/zone/'+new_domain+'/refresh')
print("DNS refreshed")
return result_refresh
def MyIP():
response = requests.get('https://ifconfig.me/ip')
print("Current IP: "+response.text)
return response.text
result_update = update_zone(new_subdomain,MyIP(),str(Domain_id()[0]))
try:
result_update = update_zone(new_subdomain,MyIP(),str(Domain_id()[0]))
except:
raise
+2
View File
@@ -1,8 +1,10 @@
FROM python:3
MAINTAINER pi-ux-ce
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
COPY . .