Skip to content
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

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

Merged
merged 20 commits into from
Oct 14, 2022

Conversation

wadells
Copy link
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

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

@wadells
Copy link
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