[wgo-web] Land a script to keep gnome-web-www in sync with git
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wgo-web] Land a script to keep gnome-web-www in sync with git
- Date: Tue, 12 Mar 2019 16:56:16 +0000 (UTC)
commit 1828744594701d64873ecb20244df8acbc664c2b
Author: Andrea Veri <averi redhat com>
Date: Tue Mar 12 17:56:05 2019 +0100
Land a script to keep gnome-web-www in sync with git
Dockerfile | 2 ++
git-pull.sh | 14 ++++++++++++++
gnome-web-www-cron.yaml | 30 ++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+)
---
diff --git a/Dockerfile b/Dockerfile
index b2533cd..bac4e76 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,6 +7,8 @@ RUN yum install rh-php71-php rh-php71-php-cli rh-php71-php-common rh-php71-php-c
RUN rpm -Uvh --nodeps $(repoquery --location mod_geoip) && \
cp /usr/lib64/httpd/modules/mod_geoip.so /etc/httpd/modules
+RUN cp git-pull.sh /usr/local/bin/git-pull.sh
+
RUN mkdir -p /srv/http/www.gnome.org
COPY 00_www.gnome.org.conf /etc/httpd/conf.d
diff --git a/git-pull.sh b/git-pull.sh
new file mode 100755
index 0000000..4da615a
--- /dev/null
+++ b/git-pull.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
+THEME_PATH="/srv/http/www.gnome.org/gnome-web-www"
+
+if [ -d "${THEME_PATH}" ]; then
+ cd "${THEME_PATH}"
+
+ git checkout -f
+ git pull
+else
+ echo "Unable to access the Bugzilla directory. Failing. \n"
+ exit 1
+fi
diff --git a/gnome-web-www-cron.yaml b/gnome-web-www-cron.yaml
new file mode 100644
index 0000000..f53d660
--- /dev/null
+++ b/gnome-web-www-cron.yaml
@@ -0,0 +1,30 @@
+apiVersion: batch/v1beta1
+kind: CronJob
+metadata:
+ name: wgo-cron
+spec:
+ schedule: '*/1 * * * *'
+ successfulJobsHistoryLimit: 3
+ failedJobsHistoryLimit: 1
+ jobTemplate:
+ metadata:
+ labels:
+ job: wgo-cron
+ spec:
+ template:
+ spec:
+ containers:
+ - name: wgo-cron
+ image: "docker-registry.default.svc:5000/wgo/prod"
+ command: "/usr/local/bin/git-pull.sh"
+ imagePullPolicy: Always
+ volumeMounts:
+ - mountPath: /srv/http/www.gnome.org
+ name: wgo-data
+ dnsPolicy: ClusterFirst
+ restartPolicy: Never
+ terminationGracePeriodSeconds: 30
+ volumes:
+ - name: wgo-data
+ persistentVolumeClaim:
+ claimName: wgo-data-claim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]