migrated to crond
This commit is contained in:
-78
@@ -1,78 +0,0 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.jonb.io
|
||||
dry_run: false
|
||||
username: jblu
|
||||
password:
|
||||
from_secret: gittea_drone
|
||||
repo: git.jonb.io/jblu/phc
|
||||
tags:
|
||||
- latest
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
- name: docker-dev
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.jonb.io
|
||||
dry_run: false
|
||||
username: jblu
|
||||
password:
|
||||
from_secret: gittea_drone
|
||||
repo: git.jonb.io/jblu/phc
|
||||
tags:
|
||||
- dev
|
||||
when:
|
||||
branch:
|
||||
- dev*
|
||||
- name: test-main
|
||||
image: git.jonb.io/jblu/phc:latest
|
||||
environment:
|
||||
PHC_PLEX_SECRET_TOKEN:
|
||||
from_secret: PHC_PLEX_SECRET_TOKEN
|
||||
PHC_HEALTHCHECK_URL:
|
||||
from_secret: PHC_HEALTHCHECK_URL
|
||||
PHC_HEALTHCHECK_ID:
|
||||
from_secret: PHC_HEALTHCHECK_ID
|
||||
PHC_PLEX_URL:
|
||||
from_secret: PHC_PLEX_URL
|
||||
CRON:
|
||||
from_secret: CRON
|
||||
commands:
|
||||
- echo $PHC_PLEX_SECRET_TOKEN
|
||||
- echo $PHC_HEALTHCHECK_URL
|
||||
- echo $PHC_HEALTHCHECK_ID
|
||||
- echo $PHC_PLEX_URL
|
||||
- echo $CRON
|
||||
- /bin/sh /opt/phc.sh
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
- name: test-dev
|
||||
image: git.jonb.io/jblu/phc:dev
|
||||
environment:
|
||||
PHC_PLEX_SECRET_TOKEN:
|
||||
from_secret: PHC_PLEX_SECRET_TOKEN
|
||||
PHC_HEALTHCHECK_URL:
|
||||
from_secret: PHC_HEALTHCHECK_URL
|
||||
PHC_HEALTHCHECK_ID:
|
||||
from_secret: PHC_HEALTHCHECK_ID
|
||||
PHC_PLEX_URL:
|
||||
from_secret: PHC_PLEX_URL
|
||||
CRON:
|
||||
from_secret: CRON
|
||||
commands:
|
||||
- echo $PHC_PLEX_SECRET_TOKEN
|
||||
- echo $PHC_HEALTHCHECK_URL
|
||||
- echo $PHC_HEALTHCHECK_ID
|
||||
- echo $PHC_PLEX_URL
|
||||
- echo $CRON
|
||||
- /bin/sh /opt/phc.sh
|
||||
when:
|
||||
branch:
|
||||
- dev*
|
||||
@@ -0,0 +1,30 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev*
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: git.jonb.io
|
||||
username: '${{ gitea.actor }}'
|
||||
password: '${{ secrets.JONBIO_CI }}'
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v4
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
push: true
|
||||
tags: git.jonb.io/jblu/phc:dev
|
||||
@@ -0,0 +1,30 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: git.jonb.io
|
||||
username: '${{ gitea.actor }}'
|
||||
password: '${{ secrets.JONBIO_CI }}'
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v4
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
push: true
|
||||
tags: git.jonb.io/jblu/phc:latest
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FROM alpine:latest
|
||||
RUN apk add --no-cache curl supercronic
|
||||
RUN apk add --no-cache curl
|
||||
COPY entrypoint.sh opt
|
||||
COPY phc.sh opt
|
||||
RUN chmod +x /opt/entrypoint.sh
|
||||
|
||||
+4
-3
@@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
CRON_CONFIG_FILE="/opt/crontab"
|
||||
CRON_CONFIG_FILE="/etc/crontabs/root"
|
||||
|
||||
echo "${CRON} sh /opt/phc.sh" > $CRON_CONFIG_FILE
|
||||
echo "${CRON} sh /opt/phc.sh" >> $CRON_CONFIG_FILE
|
||||
echo "$@reboot sh /opt/phc.sh" >> $CRON_CONFIG_FILE
|
||||
|
||||
exec supercronic -passthrough-logs -quiet $CRON_CONFIG_FILE
|
||||
exec crond -f
|
||||
Reference in New Issue
Block a user