Skip to content

Commit

Permalink
update all refs to datagov-deploy to data.gov repo
Browse files Browse the repository at this point in the history
For some reason also a linting of that JS file.
Also, included the sql file remove/revert on purpose if we want to go that route in the future.
  • Loading branch information
robert-bryson committed Nov 14, 2023
1 parent b385767 commit 34b36ba
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 50 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ You should now be able to visit `https://[ROUTE]`, where `[ROUTE]` is the route
### Secrets

ips on managing
[secrets](https://github.com/GSA/datagov-deploy/wiki/Cloud.gov-Cheat-Sheet#secrets-management).
[secrets](https://github.com/GSA/data.gov/wiki/Cloud.gov-Cheat-Sheet#secrets-management).
When creating the service for the first time, use `create-user-provided-service`
instead of update.

Expand All @@ -142,12 +142,12 @@ SAML2_PRIVATE_KEY | Base64 encoded SAML2 key matching the certificate configured
## Login.gov integration

We use Login.gov as our
[SAML2](https://github.com/GSA/datagov-deploy/wiki/SAML2-authentication)
[SAML2](https://github.com/GSA/data.gov/wiki/SAML2-authentication)
Identity Provider (IdP). Production apps use the production Login.gov instance
while other apps use the Login.gov identity sandbox.

Each year in March, Login.gov rotates their credentials. See our
[wiki](https://github.com/GSA/datagov-deploy/wiki/SAML2-authentication#working-with-logingov)
[wiki](https://github.com/GSA/data.gov/wiki/SAML2-authentication#working-with-logingov)
for details.

Our Service Provider (SP) certificate and key are provided in through
Expand Down
2 changes: 1 addition & 1 deletion ckan/setup/ckan.ini
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ ckanext.harvest.email = on
ckan.harvest.status_mail.all=True

## SAML2auth Settings
# TODO fetch and verify remote metadata https://github.com/GSA/datagov-deploy/issues/2860
# TODO fetch and verify remote metadata https://github.com/GSA/data.gov/issues/2860
ckanext.saml2auth.idp_metadata.location=local
#ckanext.saml2auth.idp_metadata.local_path = $CKANEXT__SAML2AUTH__IDP_METADATA__LOCAL_PATH
#ckanext.saml2auth.key_file_path = $CKANEXT__SAML2AUTH__KEY_FILE_PATH
Expand Down
2 changes: 1 addition & 1 deletion ckan/setup/gunicorn.conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# gunicorn prior to version 20.1.0 discloses "server" header
# https://github.com/GSA/datagov-deploy/issues/2826
# https://github.com/GSA/data.gov/issues/2826
import gunicorn
gunicorn.SERVER_SOFTWARE = ''
74 changes: 37 additions & 37 deletions e2e/cypress/integration/facets.cy.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
describe('Facets', { testIsolation: false }, () => {
before(() => {
cy.login();
});
describe("Facets", { testIsolation: false }, () => {
before(() => {
cy.login();
});

after(() => {
cy.delete_organization('org-tags');
cy.delete_group('group-facets');
cy.logout();
});
after(() => {
cy.delete_organization("org-tags");
cy.delete_group("group-facets");
cy.logout();
});

it('Show datagov facet list on dataset page', () => {
cy.visit('/dataset');
cy.get('.filters h2').its('length').should('be.equal', 9);
cy.get('.filters h2').first().contains('Topics');
cy.get('.filters h2').last().contains('Bureaus');
});
it("Show datagov facet list on dataset page", () => {
cy.visit("/dataset");
cy.get(".filters h2").its("length").should("be.equal", 9);
cy.get(".filters h2").first().contains("Topics");
cy.get(".filters h2").last().contains("Bureaus");
});

it('Show datagov facet list on organization page', () => {
cy.visit('/organization');
cy.get('a[class="btn btn-primary"]').click();
cy.create_organization_ui('org-tags', 'tags for org test');
cy.visit('/organization/org-tags');
cy.get('.module-shallow').its('length').should('be.equal', 11);
cy.get('.module-shallow').contains('Topics');
cy.get('.module-shallow').contains('Harvest Source');
cy.get('.module-shallow').last().contains('Bureaus');
});
it("Show datagov facet list on organization page", () => {
cy.visit("/organization");
cy.get('a[class="btn btn-primary"]').click();
cy.create_organization_ui("org-tags", "tags for org test");
cy.visit("/organization/org-tags");
cy.get(".module-shallow").its("length").should("be.equal", 11);
cy.get(".module-shallow").contains("Topics");
cy.get(".module-shallow").contains("Harvest Source");
cy.get(".module-shallow").last().contains("Bureaus");
});

it('Show datagov facet list on group page', () => {
cy.create_group('group-facets');
cy.visit('/group/group-facets');
cy.get('.filters h2').its('length').should('be.equal', 6);
cy.get('.filters h2').first().contains('Categories');
cy.get('.filters h2').last().contains('Organizations');
});
it("Show datagov facet list on group page", () => {
cy.create_group("group-facets");
cy.visit("/group/group-facets");
cy.get(".filters h2").its("length").should("be.equal", 6);
cy.get(".filters h2").first().contains("Categories");
cy.get(".filters h2").last().contains("Organizations");
});

// https://github.com/GSA/datagov-deploy/issues/3672
it('Can visit organization and group facet link', () => {
cy.visit('/organization/org-tags?tags=_');
cy.visit('/group/group-facets?tags=_');
});
// https://github.com/GSA/data.gov/issues/3672
it("Can visit organization and group facet link", () => {
cy.visit("/organization/org-tags?tags=_");
cy.visit("/group/group-facets?tags=_");
});
});
2 changes: 1 addition & 1 deletion postgresql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ ARG DATASTORE_READONLY_PASSWORD

# Include extra setup scripts (eg datastore)
ADD docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
ADD https://github.com/GSA/datagov-deploy/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz /docker-entrypoint-initdb.d/locations.sql.gz
ADD https://github.com/GSA/data.gov/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz /docker-entrypoint-initdb.d/locations.sql.gz
RUN chmod 666 /docker-entrypoint-initdb.d/locations.sql.gz
4 changes: 2 additions & 2 deletions solr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN git clone https://github.com/aws/efs-utils && \
# Install hostname resolution dependencies
RUN apt-get install -y dnsutils

# Fix Issue https://github.com/GSA/datagov-deploy/issues/3285
# Fix Issue https://github.com/GSA/data.gov/issues/3285
# Update the angularjs library files
ADD https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.2/angular.min.js \
https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.2/angular.js \
Expand Down Expand Up @@ -63,7 +63,7 @@ RUN sed -i 's/jquery-1.7.2.min.js/jquery-3.6.0.min.js/' \
/opt/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/head.vm


# Fix Issue https://github.com/GSA/datagov-deploy/issues/3283
# Fix Issue https://github.com/GSA/data.gov/issues/3283
# Disable directory listing
RUN perl -0777 -i -pe 's/ \
<param-name>dirAllowed<\/param-name>\n.*<param-value>true<\/param-value>/ \
Expand Down
6 changes: 3 additions & 3 deletions tools/locations-table/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Locations table

The locations table [was defined in 2016](https://github.com/GSA/datagov-deploy/search?q=location+table&type=commits).
This table was deleted from the repo but is still available from old commits: [locations.sql.gz](https://github.com/GSA/datagov-deploy/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz).
The locations table [was defined in 2016](https://github.com/GSA/data.gov/search?q=location+table&type=commits).
This table was deleted from the repo but is still available from old commits: [locations.sql.gz](https://github.com/GSA/data.gov/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz).

This table could be dd to database with

```
./install-locations-table.sh HOST DB_NAME DB_USER PASS
```
```
4 changes: 2 additions & 2 deletions tools/locations-table/install-locations-table.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ DB_USER=$3
PASS=$4

echo "Downloading locations table"
wget https://github.com/GSA/datagov-deploy/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz -O $DEST_FOLDER/locations.sql.gz
wget https://github.com/GSA/data.gov/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz -O $DEST_FOLDER/locations.sql.gz

echo "Creating locations table"
gunzip -c ${DEST_FOLDER}/locations.sql.gz | PGPASSWORD=${PASS} psql -h $HOST -U $DB_USER -d $DB_NAME -v ON_ERROR_STOP=1

echo "Cleaning"
rm -f $DEST_FOLDER/locations.sql.gz
rm -f $DEST_FOLDER/locations.sql.gz

0 comments on commit 34b36ba

Please sign in to comment.