Skip to content

Commit

Permalink
Make environments use all the expected repositories
Browse files Browse the repository at this point in the history
* dev environment uses apt-test nightlies repo for Debian, and yum-test
  for dom0
* staging environment uses apt-test main repo for Debian, and yum-test
  for dom0
* prod environment uses apt main repo for Debian and yum for dom0
  • Loading branch information
eaon committed Jun 14, 2022
1 parent 5ca18f3 commit 69b4a9e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
19 changes: 17 additions & 2 deletions dom0/sd-default-config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,23 @@
{% import_json "sd/config.json" as d %}

# Respect "dev" env if provided, default to "prod"
{% if d.environment == "dev" or d.environment == "staging" %}
{% set sdvars = sdvars_defaults["dev"] %}
{% if d.environment == "dev" %}
# use apt-test and nightlies
{% set sdvars = sdvars_defaults["test"] %}
{% set _ = sdvars.update({"component": "nightlies"}) %}
{% elif d.environment == "staging" %}
# use apt-test and main (RC/test builds)
{% set sdvars = sdvars_defaults["test"] %}
{% set _ = sdvars.update({"component": "main"}) %}
{% else %}
{% set sdvars = sdvars_defaults["prod"] %}
{% set _ = sdvars.update({"component": "main"}) %}
{% endif %}

# Append repo URL with appropriate dom0 Fedora version
{% if grains['osrelease'] == '4.1' %}
{% set fedora_repo = "f32" %}
{% else %}
{% set fedora_repo = "f24" %}
{% endif %}
{% set _ = sdvars.update({"dom0_yum_repo_url": sdvars["dom0_yum_repo_url"] + fedora_repo}) %}
13 changes: 7 additions & 6 deletions dom0/sd-default-config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
# Both prod.dom0_yum_repo_url and test.dom0_yum_repo_url will be appended to with
# the respective Fedora release depending on Qubes OS version
#
# Production variables, for use with real-world installs
prod:
dom0_yum_repo_url: "https://yum.securedrop.org/workstation/dom0/f25"
dom0_yum_repo_url: "https://yum.securedrop.org/workstation/dom0/"
apt_repo_url: "https://apt.freedom.press"
signing_key_filename: "securedrop-release-signing-pubkey-2021.asc"
component: "main"
# Development variables, suited for use during local development
dev:
dom0_yum_repo_url: "https://yum-test.securedrop.org/workstation/dom0/f25"
# Staging and Dev variables, for QAing and local development
test:
dom0_yum_repo_url: "https://yum-test.securedrop.org/workstation/dom0/"
apt_repo_url: "https://apt-test.freedom.press"
signing_key_filename: "apt-test-pubkey.asc"
component: "nightlies"

0 comments on commit 69b4a9e

Please sign in to comment.