websites: new main website deployment on prod
This commit is contained in:
parent
6b596e84e2
commit
be32dcebb4
5 changed files with 5 additions and 85 deletions
|
@ -277,28 +277,6 @@
|
||||||
path: /index.html
|
path: /index.html
|
||||||
target: https://flocktofedora.org/
|
target: https://flocktofedora.org/
|
||||||
|
|
||||||
# Redirect specific websites from fedoraproject.org to getfedora.org
|
|
||||||
- role: httpd/redirect
|
|
||||||
shortname: main-fedoraproject
|
|
||||||
website: fedoraproject.org
|
|
||||||
path: /index.html
|
|
||||||
target: https://getfedora.org/
|
|
||||||
when: env != "staging"
|
|
||||||
|
|
||||||
- role: httpd/redirect
|
|
||||||
shortname: get-fedora-old
|
|
||||||
website: fedoraproject.org
|
|
||||||
path: /get-fedora
|
|
||||||
target: https://getfedora.org/
|
|
||||||
when: env != "staging"
|
|
||||||
|
|
||||||
- role: httpd/redirect
|
|
||||||
shortname: sponsors
|
|
||||||
website: fedoraproject.org
|
|
||||||
path: /sponsors
|
|
||||||
target: https://getfedora.org/sponsors
|
|
||||||
when: env != "staging"
|
|
||||||
|
|
||||||
- role: httpd/redirect
|
- role: httpd/redirect
|
||||||
shortname: code-of-conduct
|
shortname: code-of-conduct
|
||||||
website: fedoraproject.org
|
website: fedoraproject.org
|
||||||
|
@ -317,26 +295,6 @@
|
||||||
path: /code-of-conduct.html
|
path: /code-of-conduct.html
|
||||||
target: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
|
target: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
|
||||||
|
|
||||||
- role: httpd/redirect
|
|
||||||
shortname: verify
|
|
||||||
website: fedoraproject.org
|
|
||||||
path: /verify
|
|
||||||
target: https://getfedora.org/verify
|
|
||||||
when: env != "staging"
|
|
||||||
|
|
||||||
- role: httpd/redirect
|
|
||||||
shortname: keys
|
|
||||||
website: fedoraproject.org
|
|
||||||
path: /keys
|
|
||||||
target: https://getfedora.org/keys
|
|
||||||
when: env != "staging"
|
|
||||||
|
|
||||||
- role: httpd/redirect
|
|
||||||
shortname: release-banner
|
|
||||||
website: fedoraproject.org
|
|
||||||
path: /static/js/release-counter-ext.js
|
|
||||||
target: https://getfedora.org/static/js/release-counter-ext.js
|
|
||||||
when: env != "staging"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# When there is no prerelease we redirect the prerelease urls
|
# When there is no prerelease we redirect the prerelease urls
|
||||||
|
|
|
@ -89,15 +89,12 @@
|
||||||
objectname: fedora-websites-cron.yml
|
objectname: fedora-websites-cron.yml
|
||||||
|
|
||||||
# New websites 3.0
|
# New websites 3.0
|
||||||
# STAGING ONLY
|
|
||||||
- role: openshift/object
|
- role: openshift/object
|
||||||
app: websites
|
app: websites
|
||||||
file: obc.yml
|
file: obc.yml
|
||||||
objectname: obc.yml
|
objectname: obc.yml
|
||||||
when: env == "staging"
|
|
||||||
|
|
||||||
- role: openshift/object
|
- role: openshift/object
|
||||||
app: websites
|
app: websites
|
||||||
template: deployment.yml
|
template: deployment.yml
|
||||||
objectname: deployment.yml
|
objectname: deployment.yml
|
||||||
when: env == "staging"
|
|
||||||
|
|
|
@ -3,36 +3,26 @@
|
||||||
state: present
|
state: present
|
||||||
name:
|
name:
|
||||||
- s3cmd
|
- s3cmd
|
||||||
when: env == "staging"
|
|
||||||
tags:
|
tags:
|
||||||
- fedora-web
|
- fedora-web
|
||||||
- fedora-web/main
|
- fedora-web/main
|
||||||
|
|
||||||
- name: Copy in the sync-fedora-web cronjob
|
|
||||||
copy: src=cron-sync-fedora-web dest=/etc/cron.d/sync-fedora-web
|
|
||||||
tags:
|
|
||||||
- fedora-web
|
|
||||||
- fedora-web/main
|
|
||||||
when: env != "staging"
|
|
||||||
|
|
||||||
- name: Load s3 credentials
|
- name: Load s3 credentials
|
||||||
ansible.builtin.include_vars:
|
ansible.builtin.include_vars:
|
||||||
file: "{{ private }}/files/websites/s3_fedoraproject_{{ env_short }}.yml"
|
file: "{{ private }}/files/websites/s3_fedoraproject_{{ env_short }}.yml"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: env == "staging"
|
|
||||||
tags:
|
tags:
|
||||||
- fedora-web
|
- fedora-web
|
||||||
- fedora-web/main
|
- fedora-web/main
|
||||||
|
|
||||||
- name: Copy in the sync-fedora-web-stg cronjob
|
- name: Copy in the sync-fedora-web-v3 cronjob
|
||||||
copy:
|
copy:
|
||||||
src: cron-sync-fedora-web-stg
|
src: cron-sync-fedora-web-v3
|
||||||
dest: /etc/cron.d/sync-fedora-web
|
dest: /etc/cron.d/sync-fedora-web
|
||||||
tags:
|
tags:
|
||||||
- fedora-web
|
- fedora-web
|
||||||
- fedora-web/main
|
- fedora-web/main
|
||||||
when:
|
when:
|
||||||
- env == "staging"
|
|
||||||
- fedoraproject_s3_bucket_name is defined
|
- fedoraproject_s3_bucket_name is defined
|
||||||
|
|
||||||
- name: Create fedoraproject-sync script
|
- name: Create fedoraproject-sync script
|
||||||
|
@ -44,7 +34,6 @@
|
||||||
- fedora-web
|
- fedora-web
|
||||||
- fedora-web/main
|
- fedora-web/main
|
||||||
when:
|
when:
|
||||||
- env == "staging"
|
|
||||||
- fedoraproject_s3_bucket_name is defined
|
- fedoraproject_s3_bucket_name is defined
|
||||||
|
|
||||||
- name: Make directory for the config files for {{website}} we are about to copy
|
- name: Make directory for the config files for {{website}} we are about to copy
|
||||||
|
|
|
@ -8,36 +8,12 @@ spec:
|
||||||
failedBuildsHistoryLimit: 2
|
failedBuildsHistoryLimit: 2
|
||||||
successfulBuildsHistoryLimit: 1
|
successfulBuildsHistoryLimit: 1
|
||||||
source:
|
source:
|
||||||
{% if env == 'staging' %}
|
|
||||||
git:
|
git:
|
||||||
uri: "https://gitlab.com/fedora/websites-apps/fedora-websites/fedora-websites-3.0.git"
|
uri: "https://gitlab.com/fedora/websites-apps/fedora-websites/fedora-websites-3.0.git"
|
||||||
ref: main
|
{% if env == 'staging' %}
|
||||||
|
ref: staging
|
||||||
{% else %}
|
{% else %}
|
||||||
dockerfile: |-
|
ref: main
|
||||||
FROM fedora:34
|
|
||||||
RUN dnf -y install \
|
|
||||||
git \
|
|
||||||
nss_wrapper \
|
|
||||||
python-unversioned-command \
|
|
||||||
python3-flask \
|
|
||||||
python3-frozen-flask \
|
|
||||||
python3-flask-assets \
|
|
||||||
python3-rjsmin \
|
|
||||||
python3-cssmin \
|
|
||||||
python3-flask-babel \
|
|
||||||
python3-flask-htmlmin \
|
|
||||||
python3-cssutils \
|
|
||||||
python3-gnupg \
|
|
||||||
rubygem-sass \
|
|
||||||
babel \
|
|
||||||
python3-jinja2 \
|
|
||||||
python3-pyyaml \
|
|
||||||
python3-dateutil \
|
|
||||||
python3-dogpile-cache \
|
|
||||||
python3-requests \
|
|
||||||
python3-zanata-client && \
|
|
||||||
dnf clean all
|
|
||||||
CMD bash /etc/websites/build.sh
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
strategy:
|
strategy:
|
||||||
type: Docker
|
type: Docker
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue