I’m want to customize the deployment configuration commands for my fork only, without having to manually revert circle.yml edits before I open a pull request on the upstream repo. Is this possible or does anyone have any recommended workarounds?
I don’t think there is much that can be done here
Are the changes to the deployment related to environment variables? If so, you could specify those in the Environment Variables
section in the UI.
You can also use the owner field in the deployment block of your circle.yml that these commands should only be run on your fork. The change to circle.yml would still get merged to the upstream repo, but the additional commands won’t run on builds for the upstream repo. Would this work for you?
@frank this will work beautifully, thanks! I guess I missed then when I read through the docs.
Follow up question! Suppose my deployment configuration is as follows:
deployment:
default:
branch: ...
commands:
...
custom:
owner: fork_owner
branch: ...
commands:
...
If I push as “fork_owner” will it run the commands in both deployment subsections, or just the one with me as the owner? The desired outcome here is that there is a default configuration. Can the “owner” value be a regex?
The deployment section that will be executed will be the first match, so you would need to place the command that contains the owner
field first in your circle.yml.
owner
can only be a string—unfortunately no regex is allowed there at this point.