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

feat(promotions): support copying folders and files for Git #2054

Closed
wants to merge 7 commits into from

Conversation

hiddeco
Copy link
Contributor

@hiddeco hiddeco commented May 23, 2024

Related to #1250 (and more specifically #1250 (comment)).

This adds minimal support for copying files or directories into user-defined paths during a Git promotion. The primary goal of this pull request is to get a feel of how it could work, as the issue appears to be more of a collection of desired outcomes rather than concrete descriptions of functionalities.

spec:
  promotionMechanisms:
    gitRepoUpdates:
    - repoURL: https://github.com/hiddeco/kargo-test.git
      writeBranch: env/dev
      patches:
      # From a Freight commit
      - copy:
          repoURL: https://github.com/example/charts.git
          source: base/values.yaml
          destination: env/dev/values.yaml
      # Within the same repository
      - copy:
          source: base/values.yaml
          destination: env/dev/values.yaml
      render: {}

Copy link

netlify bot commented May 23, 2024

Deploy Preview for docs-kargo-akuity-io ready!

Name Link
🔨 Latest commit facf756
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/6655f6d436d4c1000844c810
😎 Deploy Preview https://deploy-preview-2054.kargo.akuity.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 60.49383% with 64 lines in your changes are missing coverage. Please review.

Project coverage is 45.86%. Comparing base (da3c588) to head (783ef6f).
Report is 5 commits behind head on main.

Current head 783ef6f differs from pull request most recent head facf756

Please upload reports for the commit facf756 to get more accurate results.

Files Patch % Lines
internal/controller/promotion/git.go 53.15% 46 Missing and 6 partials ⚠️
internal/fs/copy.go 73.91% 6 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2054      +/-   ##
==========================================
+ Coverage   45.84%   45.86%   +0.01%     
==========================================
  Files         236      239       +3     
  Lines       16121    16332     +211     
==========================================
+ Hits         7391     7491     +100     
- Misses       8367     8467     +100     
- Partials      363      374      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hiddeco hiddeco force-pushed the git-patch-file-copy branch 5 times, most recently from 93913a0 to 68d3cdd Compare May 28, 2024 08:52
hiddeco added 3 commits May 28, 2024 11:50
This moves things under `patches[].copy`, while also adding a `RepoURL`
to allow to reference a repository from which things should be copied.

Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
@hiddeco hiddeco force-pushed the git-patch-file-copy branch from 68d3cdd to 783ef6f Compare May 28, 2024 09:53
@hiddeco hiddeco force-pushed the git-patch-file-copy branch from c9ae79b to facf756 Compare May 28, 2024 15:22
@krancour krancour added this to the v0.9.0 milestone Jun 27, 2024
@krancour
Copy link
Member

I think we can close this since #2536 has this.

@krancour krancour closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants