Skip to content

CPP-2814 feat: add serverless authentication using serverless assume role #1210

Merged
zeinaaabbb merged 1 commit intomainfrom
add-serverless-assume-role
Apr 17, 2026
Merged

CPP-2814 feat: add serverless authentication using serverless assume role #1210
zeinaaabbb merged 1 commit intomainfrom
add-serverless-assume-role

Conversation

@zeinaaabbb
Copy link
Copy Markdown
Contributor

Description

This PR adds serverless authentication for the teardown steps in the pr-close workflow.

Previously, the teardown step would fail due to a lack of authentication. This introduces serverless-assume-role steps, similar to how we already handle with Hako apps

Checklist:

  • My branch has been rebased onto the latest commit on main (don't merge main into your branch)
  • My commit messages are conventional commits, for example: feat(circleci): add support for nightly workflows, fix: set Heroku app name for staging apps too

@zeinaaabbb zeinaaabbb requested a review from a team as a code owner April 9, 2026 16:00
@zeinaaabbb zeinaaabbb changed the title CPP-2814 feat: add severless authentication using serverless assume role CPP-2814 feat: add serverless authentication using serverless assume role Apr 9, 2026
Comment thread plugins/serverless/.toolkitrc.yml Outdated
- name: 'teardown-review'
steps:
pre:
- serverless-assume-role
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Have we tested or used this step anywhere? The docs seem to suggest that the orb exports a setup job that should be used along with a custom executor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olusoladavid, I was tryining to replicate what we have done in here in cloudsmith yaml file?

Comment thread plugins/serverless/.toolkitrc.yml Outdated
- name: 'teardown-review'
steps:
pre:
- serverless-assume-role
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: ah I was wrong actually this command comes from the Tool Kit orb instead of the serverless-framework orb (so we don't need to import the latter orb in the end.) you can access it be using the Tool Kit orb's name as a prefix, like this

Suggested change
- serverless-assume-role
- tool-kit/serverless-assume-role

additionally, the command takes two arguments which need to be passed to it for it to work. they can be passed similar to how they are passed to the deploy-* jobs, like this (note you don't need the !toolkit/if-defined line because this is the serverless plugin so those options are always required)

@zeinaaabbb zeinaaabbb requested a review from ivomurrell April 15, 2026 16:23
Comment thread plugins/serverless/.toolkitrc.yml Outdated
@zeinaaabbb zeinaaabbb force-pushed the add-serverless-assume-role branch from bac84c1 to 15c40dd Compare April 16, 2026 15:22
@zeinaaabbb zeinaaabbb requested a review from ivomurrell April 16, 2026 15:25
Copy link
Copy Markdown
Contributor

@ivomurrell ivomurrell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! fingers crossed this will fix it 🤞🤞

@zeinaaabbb zeinaaabbb merged commit 9cd7314 into main Apr 17, 2026
14 checks passed
@zeinaaabbb zeinaaabbb deleted the add-serverless-assume-role branch April 17, 2026 08:08
steps:
pre:
- tool-kit/serverless-assume-role:
aws-account-id: '@dotcom-tool-kit/serverless.awsAccountId'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: these need to use the !tool-kit/option syntax like in the circleci-deploy example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants