Skip to content

Commit

Permalink
Merge branch 'main' into za/2771-create-requesting-entity-page
Browse files Browse the repository at this point in the history
  • Loading branch information
zandercymatics committed Oct 30, 2024
2 parents ee71ba4 + ab6f66f commit b3faa00
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 36 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/clone-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,41 @@ on:
env:
DESTINATION_ENVIRONMENT: ms
SOURCE_ENVIRONMENT: staging


jobs:
clone-database:
runs-on: ubuntu-latest
env:
CF_USERNAME: CF_MS_USERNAME
CF_PASSWORD: CF_MS_PASSWORD
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Cloud Foundry CLI
- name: Share DB Service
uses: cloud-gov/cg-cli-tools@main

- name: Clone
env:
CF_USERNAME: CF_${{ env.DESTINATION_ENVIRONMENT }}_USERNAME
CF_PASSWORD: CF_${{ env.DESTINATION_ENVIRONMENT }}_PASSWORD
run: |
# login to cf cli
cf login -a api.fr.cloud.gov -u $CF_USERNAME -p $CF_PASSWORD -o cisa-dotgov -s ${{ env.DESTINATION_ENVIRONMENT }}
# install cg-manage-rds tool
pip install git+https://github.com/cloud-gov/cg-manage-rds.git
# share the sandbox db with the Staging space
cf share-service getgov-${{ env.DESTINATION_ENVIRONMENT }}-database -s ${{ env.SOURCE_ENVIRONMENT }}
# target the Staging space
cf target -s ${{ env.SOURCE_ENVIRONMENT }}
# clone from staging to the sandbox
cg-manage-rds clone getgov-${{ env.SOURCE_ENVIRONMENT }}-database getgov-${{ env.DESTINATION_ENVIRONMENT }}-database
rm db_backup.sql
# switch to the target sandbox space
cf target -s ${{ env.DESTINATION_ENVIRONMENT }}
# un-share the sandbox from Staging
cf unshare-service getgov-${{ env.DESTINATION_ENVIRONMENT }}-database -s ${{ env.SOURCE_ENVIRONMENT }}
with:
cf_username: ${{ secrets[env.CF_USERNAME] }}
cf_password: ${{ secrets[env.CF_PASSWORD] }}
cf_org: cisa-dotgov
cf_space: ${{ env.DESTINATION_ENVIRONMENT }}
cf_command: share-service getgov-${{ env.DESTINATION_ENVIRONMENT }}-database -s ${{ env.SOURCE_ENVIRONMENT }}

- name: Clone Database
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CF_MS_USERNAM }}
cf_password: ${{ secrets.CF_MS_PASSWORD }}
cf_org: cisa-dotgov
cf_space: ${{ env.SOURCE_ENVIRONMENT }}
command: cg-manage-rds clone getgov-${{ env.SOURCE_ENVIRONMENT }}-database getgov-${{ env.DESTINATION_ENVIRONMENT }}-database

- name: Unshare DB Service
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CF_MS_USERNAM }}
cf_password: ${{ secrets.CF_MS_PASSWORD }}
cf_org: cisa-dotgov
cf_space: ${{ env.SOURCE_ENVIRONMENT }}
cf_command: unshare-service getgov-${{ env.DESTINATION_ENVIRONMENT }}-database -s ${{ env.SOURCE_ENVIRONMENT }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 4.2.10 on 2024-10-28 16:39

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
(
"registrar",
"0134_rename_portfolio_additional_permissions_portfolioinvitation_additional_permissions_and_more",
),
]

operations = [
migrations.AlterField(
model_name="federalagency",
name="agency",
field=models.CharField(null=True, verbose_name="Federal agency"),
),
migrations.AlterField(
model_name="federalagency",
name="federal_type",
field=models.CharField(
choices=[("executive", "Executive"), ("judicial", "Judicial"), ("legislative", "Legislative")],
max_length=20,
null=True,
),
),
]
6 changes: 3 additions & 3 deletions src/registrar/models/federal_agency.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ class Meta:

agency = models.CharField(
null=True,
blank=True,
help_text="Federal agency",
blank=False,
verbose_name="Federal agency",
)

federal_type = models.CharField(
max_length=20,
choices=BranchChoices.choices,
null=True,
blank=True,
blank=False,
)

acronym = models.CharField(
Expand Down
7 changes: 6 additions & 1 deletion src/registrar/templates/domain_request_dotgov_domain.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
<ul class="usa-list">
<li>Be available </li>
<li>Relate to your organization’s name, location, and/or services </li>
{% if portfolio %}
<li>Be clear to the general public. Your domain name must not be easily confused with other organizations.</li>
{% else %}
<li>Be unlikely to mislead or confuse the general public (even if your domain is only intended for a specific audience) </li>
{% endif %}
</ul>
</p>

Expand All @@ -19,11 +23,12 @@

<p>Note that <strong>only federal agencies can request generic terms</strong> like
vote.gov.</p>

{% if not portfolio %}
<h2 class="margin-top-3">Domain examples for your type of organization</h2>
<div class="domain_example">
{% include "includes/domain_example.html" %}
</div>
{% endif %}
{% endblock %}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@

{% block form_fields %}

<fieldset class="usa-fieldset margin-top-2">
<legend>
<fieldset class="usa-fieldset margin-top-2">
<h2>Is there anything else you’d like us to know about your domain request?</h2>
</legend>
</fieldset>

<div class="margin-top-3" id="anything-else">
<p>Provide details below. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></p>
<p><em>Provide details below. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em></p>
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
{% input_with_errors forms.0.anything_else %}
{% endwith %}
Expand Down

0 comments on commit b3faa00

Please sign in to comment.