websites: use f34 for build & nss_wrapper for git+ssh
This commit is contained in:
parent
9fddbf3f3a
commit
fb3363e9a6
5 changed files with 41 additions and 16 deletions
|
@ -7,9 +7,10 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
source:
|
source:
|
||||||
dockerfile: |-
|
dockerfile: |-
|
||||||
FROM fedora:latest
|
FROM fedora:34
|
||||||
RUN dnf -y install \
|
RUN dnf -y install \
|
||||||
git \
|
git \
|
||||||
|
nss_wrapper \
|
||||||
python-unversioned-command \
|
python-unversioned-command \
|
||||||
python3-flask \
|
python3-flask \
|
||||||
python3-frozen-flask \
|
python3-frozen-flask \
|
||||||
|
|
9
roles/openshift-apps/websites/templates/cm-updatepot.yml
Normal file
9
roles/openshift-apps/websites/templates/cm-updatepot.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: updatepot-scripts
|
||||||
|
data:
|
||||||
|
updatepot.sh: |-
|
||||||
|
{{ load_file('updatepot.sh') | indent() }}
|
|
@ -20,20 +20,9 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: pushpot
|
- name: pushpot
|
||||||
image: docker-registry.default.svc:5000/websites/builder:latest
|
image: docker-registry.default.svc:5000/websites/builder:latest
|
||||||
command: ["/bin/bash", "-c"]
|
command:
|
||||||
args:
|
- /bin/bash
|
||||||
- |
|
- /scripts/updatepot.sh
|
||||||
cd /tmp
|
|
||||||
git clone https://pagure.io/fedora-web/websites.git
|
|
||||||
cd websites
|
|
||||||
|
|
||||||
for i in getfedora.org; do
|
|
||||||
pushd sites/$i/scripts
|
|
||||||
./translations-source.sh
|
|
||||||
[ -f $i.pot ] && ./push-pot.sh
|
|
||||||
popd
|
|
||||||
done
|
|
||||||
env: []
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /.gitconfig
|
- mountPath: /.gitconfig
|
||||||
name: gitconfig
|
name: gitconfig
|
||||||
|
@ -42,6 +31,8 @@ spec:
|
||||||
- name: sshconfig
|
- name: sshconfig
|
||||||
mountPath: /.ssh
|
mountPath: /.ssh
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
- name: scripts
|
||||||
|
mountPath: /scripts
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
startingDeadlineSeconds: 600
|
startingDeadlineSeconds: 600
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -51,3 +42,6 @@ spec:
|
||||||
- name: gitconfig
|
- name: gitconfig
|
||||||
configMap:
|
configMap:
|
||||||
name: gitconfig
|
name: gitconfig
|
||||||
|
- name: scripts
|
||||||
|
configMap:
|
||||||
|
name: updatepot-scripts
|
||||||
|
|
|
@ -6,7 +6,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
app: websites
|
app: websites
|
||||||
stringData:
|
stringData:
|
||||||
id_rsa_web_trans: |-
|
id_rsa_web_trans: |
|
||||||
{{ lookup('file', ssh_key_path) | indent(4) }}
|
{{ lookup('file', ssh_key_path) | indent(4) }}
|
||||||
config: |-
|
config: |-
|
||||||
Host pagure.io
|
Host pagure.io
|
||||||
|
|
21
roles/openshift-apps/websites/templates/updatepot.sh
Normal file
21
roles/openshift-apps/websites/templates/updatepot.sh
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Add OCP user to passwd
|
||||||
|
USER_ID=$(id -u)
|
||||||
|
grep -Ev ":x:${USER_ID}:" /etc/passwd > /tmp/passwd
|
||||||
|
echo "ocpuser:x:${USER_ID}:0:ocp user:/:/sbin/nologin" >> /tmp/passwd
|
||||||
|
export LD_PRELOAD=/usr/lib64/libnss_wrapper.so
|
||||||
|
export NSS_WRAPPER_PASSWD=/tmp/passwd
|
||||||
|
export NSS_WRAPPER_GROUP=/etc/group
|
||||||
|
|
||||||
|
|
||||||
|
cd /tmp
|
||||||
|
git clone https://pagure.io/fedora-web/websites.git
|
||||||
|
cd websites
|
||||||
|
|
||||||
|
for i in getfedora.org; do
|
||||||
|
pushd sites/$i/scripts
|
||||||
|
./translations-source.sh
|
||||||
|
[ -f $i.pot ] && ./push-pot.sh
|
||||||
|
popd
|
||||||
|
done
|
Loading…
Add table
Add a link
Reference in a new issue