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

added more fine-grained control of custom_before_steps #436

Merged
merged 1 commit into from
May 17, 2021

Conversation

skoef
Copy link
Contributor

@skoef skoef commented May 12, 2021

Give the option to define custom_before_steps as either an array or a hash to give more fine-grained control over the order of execution of the custom steps.

Solves #435

@skoef skoef requested review from a team as code owners May 12, 2021 12:19
@sanfrancrisko sanfrancrisko self-assigned this May 17, 2021
Copy link
Contributor

@sanfrancrisko sanfrancrisko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the enhancement @skoef

@sanfrancrisko sanfrancrisko merged commit dd6e237 into puppetlabs:main May 17, 2021
@cdenneen
Copy link
Contributor

cdenneen commented Nov 10, 2021

@skoef I just tried to add this to my .sync.yml but it yielded "No changes" when running a pdk update. Is this the correct syntax?

diff --git i/.sync.yml w/.sync.yml
index a653003..4842072 100644
--- i/.sync.yml
+++ w/.sync.yml
@@ -95,6 +95,8 @@ Rakefile:
   custom:
     image: private.jfrog.io/docker/ap/pdk-docker:latest
     default_before_script: false
+    custom_before_steps:
+      - pdk bundle exec puppet config set forge_authorization "Bearer $PUPPET_READ_TOKEN" --section main
     cache:
       paths:
       - /root/.pdk/cache
❯ pdk update
No changes required.

@skoef
Copy link
Contributor Author

skoef commented Nov 11, 2021

@cdenneen I think this has something to do with the default_before_script you have specified there. The default before script is omitted at all so it is completely up to you to specify it.

@cdenneen
Copy link
Contributor

@skoef shouldn’t the default and custom be mutually exclusive? I might not want what’s in the default but I might want some custom before/after scripts.

@skoef
Copy link
Contributor Author

skoef commented Nov 11, 2021

Basically, when disabling the default before_script, you have to define the before_scripts of your jobs anyway, so you should be in full control of the steps.

However, that default_before_script functionality is not something that was touched by this MR nor something I have an opinion about (I dó use the default before_script), so I suggest you open an issue to discuss this.

@skoef skoef deleted the customBeforeSteps branch November 11, 2021 15:28
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.

3 participants