Skip to content

[v8] Refactor Drone Pipelines to use AWS role assumption#17260

Merged
wadells merged 20 commits into
branch/v8from
walt/v8-role-assumption
Oct 14, 2022
Merged

[v8] Refactor Drone Pipelines to use AWS role assumption#17260
wadells merged 20 commits into
branch/v8from
walt/v8-role-assumption

Conversation

@wadells
Copy link
Copy Markdown
Contributor

@wadells wadells commented Oct 11, 2022

Backports #17201
Backports #17260
Backports #17334
Backports #17274
Backports #17314
Backports #17406

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

Porting drone changes to v8 is messy, due to the lack of dronegen and subsequent drift between branches.

Changes include:

  • Diffs already present v9:
    • 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.
  • v8 specific changes:

Testing Done

Tag: https://drone.platform.teleport.sh/gravitational/teleport/16475
Promote: https://drone.platform.teleport.sh/gravitational/teleport/16483

Previously it was in a different place in the .drone.yml on v8 than in
v9+. This meant any changes to the pipeline would result in merge
conflicts. After this change, the order is consistent with more recent
branches that have dronegen.
These are reversed in master/v11 (ecr first, and then quay) and
having the order consistent across branches will make future ports easier.
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.
@wadells wadells force-pushed the walt/v8-role-assumption branch 2 times, most recently from e3791b0 to dc4dc8b Compare October 13, 2022 20:06
All other roles environment variables end in AWS_ROLE, and consistency
is our friend here.
This is a special one-off pipeline for v8
@wadells wadells force-pushed the walt/v8-role-assumption branch from e4490f4 to 1399ea4 Compare October 13, 2022 20:36
@wadells wadells marked this pull request as ready for review October 13, 2022 22:35
@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.

@wadells
Copy link
Copy Markdown
Contributor Author

wadells commented Oct 14, 2022

Tag and promte are clean. Merging.

@wadells wadells merged commit e808779 into branch/v8 Oct 14, 2022
@wadells wadells deleted the walt/v8-role-assumption branch October 14, 2022 03:04
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