Skip to content

Commit

Permalink
Disable EN and Text boosting. Add basic prod deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
nonword committed Jul 13, 2024
1 parent 7cfca19 commit d5d230b
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,34 @@ jobs:
- name: Force ECS Update
run: |
aws ecs update-service --cluster discovery-api-qa --service discovery-api-qa --force-new-deployment
deploy-production:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
needs: tests
if: github.ref == 'refs/heads/production-node20'
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::946183545209:role/GithubActionsDeployerRole
aws-region: us-east-1

- name: Log in to ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: discovery-api
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:production-latest
docker push $ECR_REGISTRY/$ECR_REPOSITORY:production-latest
4 changes: 2 additions & 2 deletions config/production.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Greg built self-hosted production domain:
ENCRYPTED_ELASTICSEARCH_URI=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAHgwdgYJKoZIhvcNAQcGoGkwZwIBADBiBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDIYpOz/BbRlJZUul7gIBEIA1idumQ6fdf/j5/pzF4t96MGGH/eV1gD4WCyLUnScgNYqtRNK0ajRO6XVroswsrJtgCwUerDM=
# 2024-06-13:
ENCRYPTED_RESOURCES_INDEX=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAHIwcAYJKoZIhvcNAQcGoGMwYQIBADBcBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDPlFvu2fT4wofRGx2gIBEIAv8HiZp6HnHFLcrUXwocvlBQ2+zfBuU99aR+yF6GcWuXlC8vhDRQyzpbndybggaj8=
# 2024-07-11:
ENCRYPTED_RESOURCES_INDEX=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAHIwcAYJKoZIhvcNAQcGoGMwYQIBADBcBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDGBdRKmRzMe2BVCBQAIBEIAvOT7nIumnss0wJN0N4tSrhW+wh7lJ7yr7VwQhe7TVUJEmADJDEnnyvm18FMLBR4c=

ENCRYPTED_SCSB_URL=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAHwwegYJKoZIhvcNAQcGoG0wawIBADBmBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDKPFC8wFkVM5CyT6VQIBEIA5m4eLBkpChRA//ZNEWsRqIDGZmevb/thzI03a0NiAW6VfybSAYpFthh+bj/yAk1VEEBF6r1T4A2GP
ENCRYPTED_SCSB_API_KEY=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAIMwgYAGCSqGSIb3DQEHBqBzMHECAQAwbAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAw8tglwVzGKBduDD9wCARCAP4biSz13FvZVHyQ8LKCb0+uLcKUKmzWqC5abVJI0kTmQJvjr9ViHsuP9/qj94Y8E7K96sb+fn0+HZk8So6CssA==
Expand Down
4 changes: 2 additions & 2 deletions config/qa.env
Original file line number Diff line number Diff line change
@@ -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AH8wfQYJKoZIhvcNAQcGoHAwbgIBADBpBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDBKllElmWYLxGOGopQIBEIA8JJyKde/8m8iCJGKR5D8HoTJhXHeyvw9eIDeuUNKiXLfJwoVz+PDAZSxkCQtM9O91zGhXbe3l6Bk1RlYJ
Expand Down
6 changes: 6 additions & 0 deletions lib/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,9 @@ const buildElasticQuery = function (params) {
}
})

// Disabled pending review:
// Boost EN hits:
/*
query.bool.should.push({
term: {
'language.id': namedQuery({
Expand All @@ -1298,8 +1300,11 @@ const buildElasticQuery = function (params) {
}, 'language EN')
}
})
*/

// Disabled pending review:
// Boost Text hits:
/*
query.bool.should.push({
term: {
'materialType.id': namedQuery({
Expand All @@ -1308,6 +1313,7 @@ const buildElasticQuery = function (params) {
}, 'materialType Text')
}
})
*/

// Boost on-site bibs:
query.bool.should.push({
Expand Down

0 comments on commit d5d230b

Please sign in to comment.