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

Implement a new policy check workflow #1317

Merged

Commits on Feb 1, 2021

  1. Configuration menu
    Copy the full SHA
    3f124b5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a50f966 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a3bff06 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c2c3071 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7c2ae9f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cbaef56 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c40f79f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    73d5a28 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ba88d5b View commit details
    Browse the repository at this point in the history
  10. Split runAutoCommand into two functions

    runAutoPlanCommand - does what originally RunAutoplancommand was doing
    except now it returns CommandResult and []models.ProjectCommandContext
    runAutoPolicyCheckCommand - accepts CommandContext, CommandResult, and
    []models.ProjectCommandContext as arguments and runs PolicyCheckStep runner
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    5c60f93 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    4fc7b50 View commit details
    Browse the repository at this point in the history
  12. Refactor RunCommentCommand

    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    5f7eb9f View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    1f1f8cd View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    8f5190f View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    a7bfa28 View commit details
    Browse the repository at this point in the history
  16. Remove verbose code

    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    0a5ebbe View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    59bb001 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    f5dd834 View commit details
    Browse the repository at this point in the history
  19. Add policy step runner logic and conftest interfaces.

    Nish Krishnan authored and msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    7779794 View commit details
    Browse the repository at this point in the history
  20. Add show step runner to policy check stage.

    Nish Krishnan authored and msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    dad3f39 View commit details
    Browse the repository at this point in the history
  21. Add show step runner.

    Nish Krishnan authored and msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    19da887 View commit details
    Browse the repository at this point in the history
  22. Adding models.PolicyCheckCommand to buildCtx

    This also means buildPlanAllCommands call buildCtx twice once with
    models.PlanCommand and once with models.PolicyCheckCommand
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    5a1d5a4 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    7f5d250 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    b3ef64a View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    e178d43 View commit details
    Browse the repository at this point in the history
  26. Deleting buildCtx from DefaultProjectCommandBuilder

    Moving events.CommandContext to models.CommandContext this will allow me
    to remove buildCtx method and move ProjectCommandContext creation into
    models package
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    1846275 View commit details
    Browse the repository at this point in the history
  27. Move validateWorkspaceAllowed to RepoCfg

    Adding new matchers
    Fix test and add ParseValidator as a dependency
    Linting fix
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    b6fe787 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    90e1dd2 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    8338ee2 View commit details
    Browse the repository at this point in the history
  30. Implement Conftest version ensurer.

    Nish Krishnan authored and msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    d767bce View commit details
    Browse the repository at this point in the history
  31. --enable-policy-checks does not work with TFE/TFC.

    TFE/TFC doesn't allow to download plan files.
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    5d17936 View commit details
    Browse the repository at this point in the history
  32. Add tests for downloader.

    Nish Krishnan authored and msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    150e025 View commit details
    Browse the repository at this point in the history
  33. Add conftest run functionality.

    Nish Krishnan authored and msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    e3afe21 View commit details
    Browse the repository at this point in the history
  34. Adding policies top level key to server side config.

    This enables atlantis admins to create and specify their policies to be
    used by PolicyCheckStepRunner.
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    243e5b8 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    39034fd View commit details
    Browse the repository at this point in the history
  36. changing Version from string to version.Version

    Adding validation to check for version syntax correctness
    Flattened policy source object into parent struct
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    6194d6c View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    d7b9625 View commit details
    Browse the repository at this point in the history
  38. Add conftest client run implementation.

    fmt and add test dockerfile.
    Remove log statement.
    Nish Krishnan authored and msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    33eb1a6 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    56d29f3 View commit details
    Browse the repository at this point in the history
  40. comment parser for policy approval

    * Adding support to parse atlantis approve_policy comments
    
    * Refactoring plan, apply, policy_check commands into separate commands
    
    * Cleaning up command_runner.go
    
    * Fixing linting
    
    * Interface refactor.
    
    * Cleanup apply, plan, unlock commands
    
    * Addressing PR feedback
    
    * fix tests
    
    * Fixing policy_approve to approve_policies
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    4d1ead6 View commit details
    Browse the repository at this point in the history
  41. policy approvals

    * Adding ApprovePoliciesCommandRunner to handle policy approval workflow.
    
    Currently it doesn't have any dedicated ProjectCommandRunner due to the
    fact that we are circumventing any policy runs if approver is in the
    predefined list of approvers. If user is not part of the list then check
    will fail
    
    * Updating markdown template and adding policy pass condition to
    PullMergeable check
    
    * Comment to clarify approval process
    
    * Moved declaring list of policy owners to server config.
    
    * Adding unit tests and fixing syntax errors
    
    * Testing Apply Meargeable status
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    d45edfd View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    d9a3877 View commit details
    Browse the repository at this point in the history
  43. Ensure policy check doesn't run for remote backend

    * update pegomock.
    nishkrishnan authored and msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    eb3d216 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    0f89c7d View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    d10b9f4 View commit details
    Browse the repository at this point in the history
  46. [ORCA-542] conftest: support non main packages (#38)

    By default conftest only executes `main` package when running a policy.
    We want to allow for conftest to run all packages in the directory
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    8de39aa View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    1d695f1 View commit details
    Browse the repository at this point in the history
  48. Atlantis e2e tests for policy checks step (#42)

    * Adding e2e tests for policy checks.
    
    Added project lock for policy approval step.
    Moved policy approval into a DefaultProjectCommandRunner
    
    * Fixing these cursed tests
    
    * Adding conftest0.21.0 binary check
    
    * Deleting unused fixtures
    
    * Remove print statement
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    8e6eea5 View commit details
    Browse the repository at this point in the history
  49. Update error message

    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    eb6deb6 View commit details
    Browse the repository at this point in the history
  50. Removing unused variables

    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    5a65aae View commit details
    Browse the repository at this point in the history
  51. Fixing go.mod

    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    4edc6b7 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    3c5f866 View commit details
    Browse the repository at this point in the history
  53. Fixing tests

    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    176e93c View commit details
    Browse the repository at this point in the history
  54. Running go mod vendor

    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    776d453 View commit details
    Browse the repository at this point in the history
  55. Expanding Owners field to support different types. (#39)

    * Expanding Owners field to support different types.
    
    Policy Owners might be different types, for that reason we are
    refactoring Owners into its own struct with specific keys defining
    different owner types
    
    * Fixing tests
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    a45dfb8 View commit details
    Browse the repository at this point in the history
  56. Updating the code to match upstream atlantis

    Removed some references to code changes not in upstream.
    Added back support for `DisableApply`. It was erased in the cherry picking
    msarvar committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    6e0a8dd View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2021

  1. Add conftest to actual testing image.

    Nish Krishnan committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    f245c96 View commit details
    Browse the repository at this point in the history
  2. [ORCA-666] Ensure failing policy checks don't discard the locks. (#44)

    * [ORCA-666] Ensure failing policy checks don't discard the locks.
    
    * Fix tests
    
    * fix.
    nishkrishnan authored and Nish Krishnan committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    518f5a9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0e80827 View commit details
    Browse the repository at this point in the history
  4. Fixing e2e file fixtures

    msarvar committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    d3d1a6c View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2021

  1. trigger e2e test

    msarvar committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    0d5891f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d260e1c View commit details
    Browse the repository at this point in the history
  3. More order matters errors

    msarvar committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    df3ae12 View commit details
    Browse the repository at this point in the history
  4. revert autoplan reorder

    msarvar committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    44016bd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    19e865f View commit details
    Browse the repository at this point in the history
  6. fix fixture

    msarvar committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    38e05e7 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2021

  1. Configuration menu
    Copy the full SHA
    be1f47b View commit details
    Browse the repository at this point in the history
  2. fixture output fix

    msarvar committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    c3e38c2 View commit details
    Browse the repository at this point in the history
  3. fixutre output plan formating

    msarvar committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    7386ab9 View commit details
    Browse the repository at this point in the history
  4. sync with master

    msarvar committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    6458002 View commit details
    Browse the repository at this point in the history