-
Notifications
You must be signed in to change notification settings - Fork 39
chore: Generates and checks PURLS on the CI #1364
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
Changes from all commits
c0b4282
c47d88e
95466a6
21513a8
2c6b71d
b8f6fb8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,45 +36,62 @@ jobs: | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 | ||
| id: filter | ||
| with: | ||
| predicate-quantifier: 'every' | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This avoids running contract test when only the files in /compliance have changed (see https://github.com/dorny/paths-filter/tree/de90cc6fb38fc0963ad72b210f1f284cd68cea36/ for more details) |
||
| filters: | | ||
| access-list-api-key: | ||
| - 'cfn-resources/access-list-api-key/**' | ||
| - '!cfn-resources/access-list-api-key/compliance/**' | ||
| alert-configuration: | ||
| - 'cfn-resources/alert-configuration/**' | ||
| - '!cfn-resources/alert-configuration/compliance/**' | ||
| api-key: | ||
| - 'cfn-resources/api-key/**' | ||
| - '!cfn-resources/api-key/compliance/**' | ||
| auditing: | ||
| - 'cfn-resources/auditing/**' | ||
| - '!cfn-resources/auditing/compliance/**' | ||
| cloud-backup-restore-jobs: | ||
| - 'cfn-resources/cloud-backup-restore-jobs/**' | ||
| - '!cfn-resources/cloud-backup-restore-jobs/compliance/**' | ||
| cluster-outage-simulation: | ||
| - 'cfn-resources/cluster-outage-simulation/**' | ||
| - '!cfn-resources/cluster-outage-simulation/compliance/**' | ||
| federated-database-instance: | ||
| - 'cfn-resources/federated-database-instance/**' | ||
| - '!cfn-resources/federated-database-instance/compliance/**' | ||
| federated-query-limit: | ||
| - 'cfn-resources/federated-query-limit/**' | ||
| - '!cfn-resources/federated-query-limit/compliance/**' | ||
| online-archive: | ||
| - 'cfn-resources/online-archive/**' | ||
| - '!cfn-resources/online-archive/compliance/**' | ||
| organization: | ||
| - 'cfn-resources/organization/**' | ||
| - '!cfn-resources/organization/compliance/**' | ||
| private-endpoint-aws: | ||
| - 'cfn-resources/private-endpoint-aws/**' | ||
| - '!cfn-resources/private-endpoint-aws/compliance/**' | ||
| private-endpoint-service: | ||
| - 'cfn-resources/private-endpoint-service/**' | ||
| - '!cfn-resources/private-endpoint-service/compliance/**' | ||
| privatelink-endpoint-service-data-federation-online-archive: | ||
| - 'cfn-resources/privatelink-endpoint-service-data-federation-online-archive/**' | ||
| - '!cfn-resources/privatelink-endpoint-service-data-federation-online-archive/compliance/**' | ||
| project: | ||
| - 'cfn-resources/project/**' | ||
| - '!cfn-resources/project/compliance/**' | ||
| resource-policy: | ||
| - 'cfn-resources/resource-policy/**' | ||
| - '!cfn-resources/resource-policy/compliance/**' | ||
| search-deployment: | ||
| - 'cfn-resources/search-deployment/**' | ||
| serverless-private-endpoint: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is serverless-private-endpoint not needed?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is deprecated and tests can no longer be run (API does not work). I cleaned this up |
||
| - 'cfn-resources/serverless-private-endpoint/**' | ||
| - '!cfn-resources/search-deployment/compliance/**' | ||
| stream-connection: | ||
| - 'cfn-resources/stream-connection/**' | ||
| - '!cfn-resources/stream-connection/compliance/**' | ||
| stream-instance: | ||
| - 'cfn-resources/stream-instance/**' | ||
| - '!cfn-resources/stream-instance/compliance/**' | ||
| access-list-api-key: | ||
| needs: change-detection | ||
| if: ${{ needs.change-detection.outputs.access-list-api-key == 'true' }} | ||
|
|
@@ -729,48 +746,6 @@ jobs: | |
|
|
||
| cat inputs/inputs_1_create.json | ||
|
|
||
| make run-contract-testing | ||
| make delete-test-resources | ||
| serverless-private-endpoint: | ||
| needs: change-detection | ||
| if: ${{ needs.change-detection.outputs. serverless-private-endpoint == 'true' }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
| - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 | ||
| with: | ||
| go-version-file: 'cfn-resources/go.mod' | ||
| - name: setup Atlas CLI | ||
| uses: mongodb/atlas-github-action@15663d068c40a8582d881560961fce9d45e0df9a | ||
| - uses: aws-actions/setup-sam@819220f63fb333a9a394dd0a5cab2d8303fd17e2 | ||
| with: | ||
| use-installer: true | ||
| - uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df | ||
| with: | ||
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_TEST_ENV }} | ||
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_TEST_ENV }} | ||
| aws-region: eu-west-1 | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | ||
| with: | ||
| python-version: '3.9' | ||
| cache: 'pip' # caching pip dependencies | ||
| - run: pip install cloudformation-cli cloudformation-cli-go-plugin | ||
| - name: Run the Contract test | ||
| shell: bash | ||
| env: | ||
| MONGODB_ATLAS_PUBLIC_API_KEY: ${{ secrets.CLOUD_DEV_PUBLIC_KEY }} | ||
| MONGODB_ATLAS_PRIVATE_API_KEY: ${{ secrets.CLOUD_DEV_PRIVATE_KEY }} | ||
| MONGODB_ATLAS_ORG_ID: ${{ secrets.CLOUD_DEV_ORG_ID }} | ||
| MONGODB_ATLAS_TEAM_ID: 641490b0207f4d22f4d8f2fd | ||
| MONGODB_ATLAS_OPS_MANAGER_URL: https://cloud-dev.mongodb.com/ | ||
| MONGODB_ATLAS_PROFILE: cfn-cloud-dev-github-action | ||
| run: | | ||
| pushd cfn-resources/serverless-private-endpoint | ||
| make create-test-resources | ||
|
|
||
| cat inputs/inputs_1_create.json | ||
| cat inputs/inputs_1_update.json | ||
|
|
||
| make run-contract-testing | ||
| make delete-test-resources | ||
| stream-connection: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| pkg:golang/../vendor/go.mongodb.org/atlas-sdk/v20231115014@(devel) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if I understand correctly, purls.txt depends on go.mod and go.sum. We share the same go.mod files for all the resources, so all purls.txt will be always be the same.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. purl file is generated from a binary, and a binary is generated for each of the resources, so even if they share go.mod and go.sum, technically the binary is different(and that is what we are shipping) so we have to generate the purls for each |
||
| pkg:golang/github.com/aws-cloudformation/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/google/[email protected] | ||
| pkg:golang/github.com/jmespath/[email protected] | ||
| pkg:golang/github.com/mongodb-forks/[email protected] | ||
| pkg:golang/github.com/mongodb-labs/[email protected] | ||
| pkg:golang/github.com/mongodb/mongodbatlas-cloudformation-resources@(devel) | ||
| pkg:golang/github.com/rs/[email protected] | ||
| pkg:golang/github.com/segmentio/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/[email protected] | ||
| pkg:golang/golang.org/x/[email protected] | ||
| pkg:golang/gopkg.in/[email protected] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| pkg:golang/../vendor/go.mongodb.org/atlas-sdk/v20231115014@(devel) | ||
| pkg:golang/github.com/aws-cloudformation/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/google/[email protected] | ||
| pkg:golang/github.com/jmespath/[email protected] | ||
| pkg:golang/github.com/mongodb-forks/[email protected] | ||
| pkg:golang/github.com/mongodb-labs/[email protected] | ||
| pkg:golang/github.com/mongodb/mongodbatlas-cloudformation-resources@(devel) | ||
| pkg:golang/github.com/rs/[email protected] | ||
| pkg:golang/github.com/segmentio/[email protected] | ||
| pkg:golang/github.com/spf13/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/[email protected] | ||
| pkg:golang/golang.org/x/[email protected] | ||
| pkg:golang/gopkg.in/[email protected] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| pkg:golang/../vendor/go.mongodb.org/atlas-sdk/v20231115014@(devel) | ||
| pkg:golang/github.com/aws-cloudformation/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/google/[email protected] | ||
| pkg:golang/github.com/jmespath/[email protected] | ||
| pkg:golang/github.com/mongodb-forks/[email protected] | ||
| pkg:golang/github.com/mongodb-labs/[email protected] | ||
| pkg:golang/github.com/mongodb/mongodbatlas-cloudformation-resources@(devel) | ||
| pkg:golang/github.com/rs/[email protected] | ||
| pkg:golang/github.com/segmentio/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/[email protected] | ||
| pkg:golang/golang.org/x/[email protected] | ||
| pkg:golang/gopkg.in/[email protected] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| pkg:golang/../vendor/go.mongodb.org/atlas-sdk/v20231115014@(devel) | ||
| pkg:golang/github.com/aws-cloudformation/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/google/[email protected] | ||
| pkg:golang/github.com/jmespath/[email protected] | ||
| pkg:golang/github.com/mongodb-forks/[email protected] | ||
| pkg:golang/github.com/mongodb-labs/[email protected] | ||
| pkg:golang/github.com/mongodb/mongodbatlas-cloudformation-resources@(devel) | ||
| pkg:golang/github.com/rs/[email protected] | ||
| pkg:golang/github.com/segmentio/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/[email protected] | ||
| pkg:golang/golang.org/x/[email protected] | ||
| pkg:golang/gopkg.in/[email protected] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| pkg:golang/../vendor/go.mongodb.org/atlas-sdk/v20231115014@(devel) | ||
| pkg:golang/github.com/aws-cloudformation/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/google/[email protected] | ||
| pkg:golang/github.com/jmespath/[email protected] | ||
| pkg:golang/github.com/mongodb-forks/[email protected] | ||
| pkg:golang/github.com/mongodb-labs/[email protected] | ||
| pkg:golang/github.com/mongodb/mongodbatlas-cloudformation-resources@(devel) | ||
| pkg:golang/github.com/rs/[email protected] | ||
| pkg:golang/github.com/segmentio/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/[email protected] | ||
| pkg:golang/golang.org/x/[email protected] | ||
| pkg:golang/gopkg.in/[email protected] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| pkg:golang/../vendor/go.mongodb.org/atlas-sdk/v20231115014@(devel) | ||
| pkg:golang/github.com/aws-cloudformation/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/google/[email protected] | ||
| pkg:golang/github.com/jmespath/[email protected] | ||
| pkg:golang/github.com/mongodb-forks/[email protected] | ||
| pkg:golang/github.com/mongodb-labs/[email protected] | ||
| pkg:golang/github.com/mongodb/mongodbatlas-cloudformation-resources@(devel) | ||
| pkg:golang/github.com/rs/[email protected] | ||
| pkg:golang/github.com/segmentio/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/[email protected] | ||
| pkg:golang/golang.org/x/[email protected] | ||
| pkg:golang/gopkg.in/[email protected] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| pkg:golang/../vendor/go.mongodb.org/atlas-sdk/v20231115014@(devel) | ||
| pkg:golang/github.com/aws-cloudformation/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/google/[email protected] | ||
| pkg:golang/github.com/jmespath/[email protected] | ||
| pkg:golang/github.com/mongodb-forks/[email protected] | ||
| pkg:golang/github.com/mongodb-labs/[email protected] | ||
| pkg:golang/github.com/mongodb/mongodbatlas-cloudformation-resources@(devel) | ||
| pkg:golang/github.com/rs/[email protected] | ||
| pkg:golang/github.com/segmentio/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/[email protected] | ||
| pkg:golang/golang.org/x/[email protected] | ||
| pkg:golang/gopkg.in/[email protected] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| pkg:golang/../vendor/go.mongodb.org/atlas-sdk/v20231115014@(devel) | ||
| pkg:golang/github.com/aws-cloudformation/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/aws/[email protected] | ||
| pkg:golang/github.com/google/[email protected] | ||
| pkg:golang/github.com/jmespath/[email protected] | ||
| pkg:golang/github.com/mongodb-forks/[email protected] | ||
| pkg:golang/github.com/mongodb-labs/[email protected] | ||
| pkg:golang/github.com/mongodb/mongodbatlas-cloudformation-resources@(devel) | ||
| pkg:golang/github.com/rs/[email protected] | ||
| pkg:golang/github.com/segmentio/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/atlas-sdk/[email protected] | ||
| pkg:golang/go.mongodb.org/[email protected] | ||
| pkg:golang/golang.org/x/[email protected] | ||
| pkg:golang/gopkg.in/[email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
necessary, as gen-purls runs make build inside the resource directory, and that runs cfn generate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need setup-python before, e.g.: https://github.com/mongodb/mongodbatlas-cloudformation-resources/blob/master/.github/workflows/publish.yaml#L56