Skip to content

Update atmos describe affected command. Add --repo-path flag to atmos describe affected command - #313

Merged
Andriy Knysh (aknysh) merged 12 commits into
masterfrom
update-describe-affected-2
Feb 1, 2023
Merged

Andriy Knysh (aknysh) merged 12 commits into
masterfrom
update-describe-affected-2

Conversation

@aknysh

@aknysh Andriy Knysh (aknysh) commented Feb 1, 2023 •

Copy link
Copy Markdown
Member

what

why

  • The --repo-path flag specifies the filesystem path to the already cloned target repository with which to compare the current branch, and it can be used when working with private repositories

Working with Private Repositories

There are a few ways to work with private repositories with which the current local branch is compared to detect the changed files and affected Atmos stacks and components:

  • Using the --ssh-key flag to specify the filesystem path to a PEM-encoded private key to clone private repos using SSH, together with the --ssh-key-password flag to provide the encryption password for the PEM-encoded private key if the key contains a password-encrypted PEM block

  • If the atmos describe affected command is executed in a GitHub Action, and you don't want to store or generate a long-lived SSH private key on the server, you can do the following:

    • Create a GitHub Personal Access Token (PAT) with scope permissions to clone private repos

    • Add the created PAT as a repository or GitHub organization secret with the name GITHUB_TOKEN

    • In your GitHub action, clone the remote repository using the checkout GitHub action

    • Execute atmos describe affected command with the --repo-path flag set to the cloned repository path using
      the GITHUB_WORKSPACE ENV variable (which points to the default working directory on the GitHub runner for steps, and the default location of the repository when using the checkout action). For example:

      atmos describe affected --repo-path $GITHUB_WORKSPACE

@aknysh
Andriy Knysh (aknysh) temporarily deployed to preview February 1, 2023 15:37 — with GitHub Actions Inactive

@mcalhoun Matt Calhoun (mcalhoun) left a comment

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.

LGTM!

This branch was previously deployed

1 inactive deployment
preview — f5465ef1 Deployed Feb 1, 2023 by aknysh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features that do not break anything

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants