Skip to content

[v9] Refactor Drone Pipelines to use AWS role assumption#17255

Merged
wadells merged 23 commits into
branch/v9from
walt/v9-role-assumption
Oct 14, 2022
Merged

[v9] Refactor Drone Pipelines to use AWS role assumption#17255
wadells merged 23 commits into
branch/v9from
walt/v9-role-assumption

Conversation

@wadells
Copy link
Copy Markdown
Contributor

@wadells wadells commented Oct 10, 2022

Backports #17201
Backports #17301
Backports #17334
Backports #17274
Backports #17314
Backports #17406

Contributes to https://github.com/gravitational/SecOps/issues/213

There were a large range of merge conflicts during this port, including:

  • Windows native builds aren't on v9 and prior
  • Teleport Connect isn't in v9 and prior, including some refactoring of the mac pipelines done to enable mac connect builds.

Strangely, the ECR/Quay flip flop (6a3f802) seen in v10 (#17244) wasn't needed here.

Testing Done

Definitely needed given the wide array of merge conflicts.

@wadells wadells changed the title Walt/v9 role assumption [v9] Refactor Drone Pipelines to use AWS role assumption Oct 10, 2022
@wadells wadells mentioned this pull request Oct 13, 2022
Previously, "${ARTIFACT_PATH}" was interpreted as Drone variable
subsitution, resulting in "rm -rf ${ARTIFACT_PATH}/*" becoming
"rm -rf /*", which deleted credentials on the filesystem.
This is follow up to #17201, that fixes the buildbox pipeline error seen here:

An error occurred (AccessDeniedException) when calling the GetAuthorizationToken operation: User: arn:aws:iam::146628656107:user/teleport_build_user_read_only is not authorized to perform: ecr-public:GetAuthorizationToken on resource: * because no identity-based policy allows the ecr-public:GetAuthorizationToken action
This gives un-dronegen'ed pipelines the same syntax as dronegen'd ones,
which is nice for consistency.
All other roles environment variables end in AWS_ROLE, and consistency
is our friend here.
@wadells wadells force-pushed the walt/v9-role-assumption branch from 5ad11ea to 80fc114 Compare October 13, 2022 20:30
@wadells wadells marked this pull request as ready for review October 13, 2022 22:34
@github-actions
Copy link
Copy Markdown
Contributor

@wadells - this PR is large and will require admin approval to merge. Consider breaking it up into a series smaller changes.

@github-actions github-actions Bot removed the request for review from fheinecke October 13, 2022 22:44
@wadells wadells enabled auto-merge (squash) October 14, 2022 03:02
@wadells
Copy link
Copy Markdown
Contributor Author

wadells commented Oct 14, 2022

Tag & promote are clean -- working on merging.

@wadells wadells merged commit ea5f000 into branch/v9 Oct 14, 2022
@wadells wadells deleted the walt/v9-role-assumption branch October 14, 2022 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants