Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge master into prod for v1.3.0 release #1118

Merged
merged 82 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
c2fc97c
conda service implementation
Nov 20, 2023
29311a6
Merge branch 'master' into conda-support
lamarrr Dec 6, 2023
1521461
updated to new conda coordinates
Jan 8, 2024
0de000a
Merge branch 'conda-support' of https://github.com/lamarrr/clearlydef…
Jan 8, 2024
c497617
integrate changes from crawler
Jan 12, 2024
dd87cfd
updated service
Jan 31, 2024
b1a85e8
added conda repodata caching
Feb 1, 2024
298d65b
Merge branch 'master' into conda-support
lamarrr Feb 8, 2024
ddb8a76
update
lamarrr Feb 8, 2024
f47143d
[conda] refactoring and added info to schema and docs
Feb 9, 2024
0dd9357
Merge branch 'conda-support' of https://github.com/lamarrr/clearlydef…
Feb 9, 2024
01e5f30
Merge branch 'master' into conda-support
lamarrr Feb 10, 2024
356fff2
[conda] fixed docs and schema
lamarrr Feb 12, 2024
153f0e5
[conda] added optional namespaces/subdir to package revision search
Feb 14, 2024
8230a3d
Merge branch 'conda-support' of https://github.com/lamarrr/clearlydef…
Feb 14, 2024
88d7486
[conda] fixed error message for unrecognized channel
Feb 15, 2024
24c49e2
Update schemas/definition-1.0.json
lamarrr Mar 1, 2024
3b8b417
Update definition-1.0.json
lamarrr Mar 2, 2024
7620f08
Bump docker/build-push-action from 5.1.0 to 5.2.0
dependabot[bot] Mar 11, 2024
5e28e63
Bump azure/login from 1.6.1 to 2.0.0
dependabot[bot] Mar 11, 2024
21e354b
Revert "remove docker secrets from deploy action"
lumaxis Mar 14, 2024
bb48015
Update secrets names
lumaxis Mar 14, 2024
e230e7a
Fix copy & paste error
lumaxis Mar 14, 2024
4d194dc
Remove double space
lumaxis Mar 14, 2024
db802d8
Merge pull request #1073 from clearlydefined/revert-1048-elr/remove-s…
qtomlinson Mar 14, 2024
575b09e
Revert "Revert "remove docker secrets from deploy action""
lumaxis Mar 15, 2024
b5898ba
Merge pull request #1074 from clearlydefined/revert-1073-revert-1048-…
lumaxis Mar 15, 2024
df2ea31
Merge pull request #1071 from clearlydefined/dependabot/github_action…
lumaxis Mar 15, 2024
aa09bd7
Merge pull request #1070 from clearlydefined/dependabot/github_action…
lumaxis Mar 15, 2024
5de41d0
[conda] fixed XSS vulnerabilities
Mar 19, 2024
77578e3
Merge branch 'conda-support' of https://github.com/lamarrr/clearlydef…
Mar 19, 2024
ca82f80
Merge pull request #1019 from lamarrr/conda-support
lumaxis Mar 19, 2024
02e7ac9
Update linting and formatting setup
lumaxis Feb 14, 2024
45c99e8
Fix all existing formatting and lint issues
lumaxis Feb 14, 2024
e1ada50
Update .vscode/settings.json
lumaxis Feb 15, 2024
74d0641
Remove hard-coded secret
lumaxis Mar 25, 2024
67005df
Ensure parameter is string
lumaxis Mar 25, 2024
c6f71d3
Encode coordinates before returning response
lumaxis Mar 25, 2024
1589605
Add default secrets for tests
lumaxis Mar 25, 2024
eb539f0
Fix new lint issues
lumaxis Mar 25, 2024
89555eb
Merge pull request #1058 from lumaxis/update-linting-formatting
lumaxis Mar 25, 2024
3b9f973
Add now-required env vars to docs and minimal.env.json
lumaxis Apr 3, 2024
cfcd81e
Merge pull request #1083 from clearlydefined/update-required-env-docs
lumaxis Apr 4, 2024
d35e241
Add groups to dependabot.yml
lumaxis Apr 4, 2024
5676ff1
Update github-actions patterns
lumaxis Apr 4, 2024
c33d08f
Add Docker Actions group
lumaxis Apr 4, 2024
8214149
1.2.0
elrayle Apr 5, 2024
707e73b
Update ScanCode license mapping
lumaxis Apr 7, 2024
a9ac72d
Bump peter-evans/create-pull-request from 6.0.1 to 6.0.4
dependabot[bot] Apr 22, 2024
bcc7521
Update SPDX visitor function for readability
lumaxis Mar 26, 2024
2a94938
Add test to ensure LicenseRef- is not yet used
lumaxis Apr 23, 2024
91368e7
Merge pull request #1086 from clearlydefined/dependabot-groups
lumaxis Apr 24, 2024
a82f42a
Merge pull request #1049 from clearlydefined/update-scancode-licensedb
lumaxis Apr 24, 2024
fdf3c50
Bump the azure-actions group with 2 updates
dependabot[bot] Apr 24, 2024
45d8ec5
Bump the docker-actions group with 2 updates
dependabot[bot] Apr 24, 2024
b32457d
Merge pull request #1104 from clearlydefined/dependabot/github_action…
lumaxis Apr 24, 2024
f50917b
Merge pull request #1102 from clearlydefined/dependabot/github_action…
lumaxis Apr 24, 2024
ece9021
Merge pull request #1105 from clearlydefined/dependabot/github_action…
lumaxis Apr 24, 2024
b2c267c
Refactor definitionServiceTest
qtomlinson Apr 22, 2024
6a0967b
Add unit tests to check for source location
qtomlinson Apr 23, 2024
918c67d
Add source location in definition for sourcearchive package
qtomlinson Apr 23, 2024
ecb5a7f
use shared deploys workflow in operations
elrayle Apr 11, 2024
c716317
add application version of the deployed app to the health check endpoint
elrayle Apr 15, 2024
e14ba56
use camel case for appVersion
elrayle Apr 27, 2024
f04cf71
pin shared workflow for deploy to v1.0.0
elrayle Apr 27, 2024
647caa9
Merge pull request #1092 from clearlydefined/elr/shared-dev-deploy
elrayle Apr 29, 2024
b1da6d7
Update aggregatorTest.js
qtomlinson Apr 29, 2024
343a9ec
Merge remote-tracking branch 'origin/master' into qt/sourcearchive-lo…
qtomlinson Apr 29, 2024
04be0cf
Merge pull request #1108 from qtomlinson/qt/sourcearchive-location
qtomlinson Apr 29, 2024
247b076
[conda] fixed service component bug
May 7, 2024
2a936eb
[conda] fixed service component bug
May 7, 2024
e35340b
Add a simple test for conda revisions route
lumaxis May 7, 2024
1942f05
Merge pull request #1 from lumaxis/add-origins-test
lamarrr May 7, 2024
112645c
Stub out network responses in test
lumaxis May 7, 2024
78665b7
Merge pull request #1112 from lamarrr/conda-support-patch
lumaxis May 7, 2024
caf45b1
Fix originConda route
qtomlinson May 7, 2024
73e2145
Merge pull request #1113 from qtomlinson/qt/fix_conda_route
lumaxis May 7, 2024
890ea85
Rename job to "test"
lumaxis May 13, 2024
ca4e3a7
Use `npm ci` to install dependencies
lumaxis May 13, 2024
1be2f9e
Merge pull request #1114 from clearlydefined/test-workflow-job-name
lumaxis May 13, 2024
8ebe0d9
1.3.0
elrayle May 15, 2024
ecf8b6e
Merge branch 'prod' into master
elrayle May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .eslintrc.json

This file was deleted.

14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,22 @@ updates:
directory: '/'
schedule:
interval: weekly
groups:
dev-dependencies:
dependency-type: 'development'

- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
groups:
azure-actions:
patterns:
- 'azure/*'
docker-actions:
patterns:
- 'docker/*'
github-actions:
patterns:
- 'actions/*'
- 'github/*'
98 changes: 12 additions & 86 deletions .github/workflows/build-and-deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -1,95 +1,21 @@
# This workflow will build a docker image, push it to ghcr.io, and deploy it to an Azure WebApp.
name: Build and Deploy to dev service app
name: Build and Deploy -- DEV

# Update the triggers based on the environment that is being deployed to.
# Triggers for dev deployments: 1) manually triggered, 2) push to branch `master`
# Triggers for prod deployments: 1) manually triggered, 2) release created
on:
workflow_dispatch:
push:
branches: [master]

# There are secrets and environment variables that need to be set that control what is pushed to
# ghcr and Azure.
#
# Secrets:
# AZURE_CREDENTIALS: service principal that has access to the Azure WebApp
# AZURE_WEBAPP_PUBLISH_PROFILE_DEV: publish profile for the Azure WebApp NOTE: The name of the secret changes. For dev, it ends in `_DEV`. Production does not have an extension.
#
# Environment Variables:
# APPLICATION_TYPE: type of application that is being deployed; used to add a label to the Docker image (values: api | web | worker)
# AZURE_WEBAPP_NAME: name of the Azure WebApp being deployed
# DEPLOY_ENVIRONMENT: environment that the code is being deployed to; used to add a label to the Docker image (values: dev | prod)
# DEPLOY_DOCKER_TAG: the tag used for deploying a specific Docker image to Azure. For dev, use the `github.sha`. For production, use the SEMVER
# version of the release. Make sure to add this tag to the `DOCKER_TAGS` in the `Build and push Docker image` step.
# DOCKER_IMAGE_NAME: name of the Docker image that is being built and pushed to ghcr.io.

env:
APPLICATION_TYPE: api
AZURE_WEBAPP_NAME: clearlydefined-api-dev
DEPLOY_ENVIRONMENT: dev
DEPLOY_DOCKER_TAG: ${{ github.sha }}
DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}-dev

jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Log into ghcr registry
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }} # user that kicked off the action
password: ${{ secrets.GITHUB_TOKEN }} # token created when the action launched (short lived)

- name: Build and push Docker image
env:
DOCKER_TAGS: |
${{ env.DOCKER_IMAGE_NAME }}:${{ env.DEPLOY_DOCKER_TAG }}
uses: docker/build-push-action@v5.1.0
with:
context: .
push: true
file: Dockerfile
tags: ${{ env.DOCKER_TAGS }}
labels: |
env=${{ env.DEPLOY_ENVIRONMENT }}
type=${{ env.APPLICATION_TYPE }}

- name: Login for Azure cli commands
uses: azure/login@v1.6.1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Set DOCKER configs in Azure web app
uses: azure/appservice-settings@v1.1.1
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
app-settings-json: |
[
{
"name": "DOCKER_CUSTOM_IMAGE_NAME",
"value": "${{ env.DOCKER_IMAGE_NAME }}:${{ env.DEPLOY_DOCKER_TAG }}",
"slotSetting": false
},
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"value": "https://ghcr.io",
"slotSetting": false
},
{
"name": "BUILD_SHA",
"value": "${{ github.sha }}",
"slotSetting": false
}
]

- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v3.0.0
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_DEV }}
images: '${{ env.DOCKER_IMAGE_NAME }}:${{ env.DEPLOY_DOCKER_TAG }}'
uses: clearlydefined/operations/.github/workflows/app-build-and-deploy.yml@v1.0.0
secrets:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_DEV }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
PRODUCTION_DEPLOYERS: ${{ secrets.PRODUCTION_DEPLOYERS }}
with:
deploy-env: dev
application-type: api
azure-app-base-name: clearlydefined-api
azure-app-name-postfix: -dev
36 changes: 36 additions & 0 deletions .github/workflows/build-and-deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will build a docker image, push it to ghcr.io, and deploy it to an Azure WebApp.
name: Build and Deploy -- PROD

on:
workflow_dispatch:
release:
types: [published]

jobs:
determine-trigger:
name: Determine if this was triggered by a release or workflow_dispatch
runs-on: ubuntu-latest
outputs:
is-release: ${{ env.IS_RELEASE }}
steps:
- name: Check if this was triggered by a release
id: release
run: |
echo "IS_RELEASE"=${{ github.event_name == 'release' }} >> $GITHUB_ENV

build-and-deploy-prod:
uses: clearlydefined/operations/.github/workflows/app-build-and-deploy.yml@v1.0.0
needs: determine-trigger
secrets:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_PROD }}
AZURE_SECONDARY_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_PROD_EU }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
PRODUCTION_DEPLOYERS: ${{ secrets.PRODUCTION_DEPLOYERS }}
with:
deploy-env: prod
application-type: api
azure-app-base-name: clearlydefined-api
azure-app-name-postfix: -prod
secondary-azure-app-name-postfix: -prod-europe
is-release: ${{ needs.determine-trigger.outputs.is-release }}
148 changes: 0 additions & 148 deletions .github/workflows/build_and_deploy_prod.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
contents: read

jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -23,7 +23,7 @@ jobs:
cache: 'npm'

- name: Install dependencies
run: npm install
run: npm ci

- name: Run tests
run: npm test
2 changes: 1 addition & 1 deletion .github/workflows/update-scancode-licensedb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
node ./scripts/transform-scancode-licensedb.js

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6.0.1
uses: peter-evans/create-pull-request@v6.0.4
with:
add-paths: lib/scancodeMap.js
commit-message: Update ScanCode license mapping
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.github/workflows/*
.vscode/launch.json
schemas/*.json
test/**/*.json
test/**/*.yaml
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"arrowParens": "avoid",
"printWidth": 120,
"singleQuote": true,
"semi": false,
"trailingComma": "none"
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2
}
Loading
Loading