Skip to content

Commit

Permalink
feat(cloudsmith): move cloudsmith CircleCI config into plugin
Browse files Browse the repository at this point in the history
Tool Kit will be able to merge the additional custom CircleCI config
into the configuration already defined by the circleci-deploy plugin.
This will allow users to explicitly opt into the cloudsmith logic by
installing the plugin, and compartmentalises the configuration.
  • Loading branch information
ivomurrell committed Nov 27, 2024
1 parent 5a13ed9 commit a6f4eb9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 19 deletions.
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions plugins/circleci-deploy/.toolkitrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins:
- '@dotcom-tool-kit/circleci'
- '@dotcom-tool-kit/cloudsmith'

options:
hooks:
Expand Down Expand Up @@ -31,10 +30,6 @@ options:
!toolkit/if-defined '@dotcom-tool-kit/serverless.awsAccountId':
aws-account-id: !toolkit/option '@dotcom-tool-kit/serverless.awsAccountId'
system-code: !toolkit/option '@dotcom-tool-kit/serverless.systemCode'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.organisation':
cloudsmith-org: !toolkit/option '@dotcom-tool-kit/cloudsmith.organisation'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.serviceAccount':
cloudsmith-service-account: !toolkit/option '@dotcom-tool-kit/cloudsmith.serviceAccount'
- name: 'deploy-staging'
requires:
- 'setup'
Expand All @@ -44,10 +39,6 @@ options:
filters:
branches:
only: main
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.organisation':
cloudsmith-org: !toolkit/option '@dotcom-tool-kit/cloudsmith.organisation'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.serviceAccount':
cloudsmith-service-account: !toolkit/option '@dotcom-tool-kit/cloudsmith.serviceAccount'
- name: 'e2e-test-review'
requires:
- 'deploy-review'
Expand Down Expand Up @@ -80,10 +71,6 @@ options:
!toolkit/if-defined '@dotcom-tool-kit/serverless.awsAccountId':
aws-account-id: !toolkit/option '@dotcom-tool-kit/serverless.awsAccountId'
system-code: !toolkit/option '@dotcom-tool-kit/serverless.systemCode'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.organisation':
cloudsmith-org: !toolkit/option '@dotcom-tool-kit/cloudsmith.organisation'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.serviceAccount':
cloudsmith-service-account: !toolkit/option '@dotcom-tool-kit/cloudsmith.serviceAccount'
- name: 'nightly'
jobs:
- name: 'deploy-review'
Expand All @@ -98,10 +85,6 @@ options:
!toolkit/if-defined '@dotcom-tool-kit/serverless.awsAccountId':
aws-account-id: !toolkit/option '@dotcom-tool-kit/serverless.awsAccountId'
system-code: !toolkit/option '@dotcom-tool-kit/serverless.systemCode'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.organisation':
cloudsmith-org: !toolkit/option '@dotcom-tool-kit/cloudsmith.organisation'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.serviceAccount':
cloudsmith-service-account: !toolkit/option '@dotcom-tool-kit/cloudsmith.serviceAccount'
!toolkit/if-defined '@dotcom-tool-kit/circleci.cypressImage':
executors:
- name: cypress
Expand Down
1 change: 0 additions & 1 deletion plugins/circleci-deploy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"license": "ISC",
"dependencies": {
"@dotcom-tool-kit/circleci": "^7.0.2",
"@dotcom-tool-kit/cloudsmith": "^0.1.0",
"tslib": "^2.3.1"
},
"repository": {
Expand Down
36 changes: 36 additions & 0 deletions plugins/cloudsmith/.toolkitrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
version: 2

plugins:
- '@dotcom-tool-kit/circleci-deploy'

options:
hooks:
- CircleCi:
workflows:
- name: 'tool-kit'
jobs:
- name: 'deploy-review'
custom:
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.organisation':
cloudsmith-org: !toolkit/option '@dotcom-tool-kit/cloudsmith.organisation'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.serviceAccount':
cloudsmith-service-account: !toolkit/option '@dotcom-tool-kit/cloudsmith.serviceAccount'
- name: 'deploy-staging'
custom:
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.organisation':
cloudsmith-org: !toolkit/option '@dotcom-tool-kit/cloudsmith.organisation'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.serviceAccount':
cloudsmith-service-account: !toolkit/option '@dotcom-tool-kit/cloudsmith.serviceAccount'
- name: 'deploy-production'
custom:
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.organisation':
cloudsmith-org: !toolkit/option '@dotcom-tool-kit/cloudsmith.organisation'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.serviceAccount':
cloudsmith-service-account: !toolkit/option '@dotcom-tool-kit/cloudsmith.serviceAccount'
- name: 'nightly'
jobs:
- name: 'deploy-review'
custom:
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.organisation':
cloudsmith-org: !toolkit/option '@dotcom-tool-kit/cloudsmith.organisation'
!toolkit/if-defined '@dotcom-tool-kit/cloudsmith.serviceAccount':
cloudsmith-service-account: !toolkit/option '@dotcom-tool-kit/cloudsmith.serviceAccount'

0 comments on commit a6f4eb9

Please sign in to comment.