CUSTOM_SYNC is one stage in the pipeline and you can define scripts to deploy run in this stage.
Note: This feature is at the alpha status and only available for application of kind AWS Lambda.
How to configure Custom Sync
CUSTOM_SYNC to your pipeline and write commands to deploy your infrastructure.
The commands run in the directory where this application configuration file exists.
apiVersion: pipecd.dev/v1beta1 kind: LambdaApp spec: name: sam-simple labels: env: example team: abc planner: # Must add this configuration to force use CUSTOM_SYNC stage. alwaysUsePipeline: true pipeline: stages: - name: CUSTOM_SYNC with: envs: AWS_PROFILE: "sample" run: | cd sam-app sam build echo y | sam deploy --profile $AWS_PROFILE
- You can use
CUSTOM_SYNCwith any current supporting application kind, but keep
alwaysUsePipelinetrue to not run the application kind’s default
- Only one
CUSTOM_SYNCstage should be used in an application pipeline.
- The commands run with the enviroment variable
The public piped image available in PipeCD main repo (ref: Dockerfile) is based on alpine and only has a few UNIX command available (ref: piped-base Dockerfile). If you want to use your commands (
sam in the above example), you can:
- Prepare your own environment container image then add piped binary to it.
- Build your own container image based on
- Manually update your running piped container (not recommended).
autoRollback is enabled, the deployment will be rolled back in the same way as Rolling Back.
When the rolling back process is triggered in the pipeline including
CUSTOM_SYNC_ROLLBACK stage will be added to the deployment pipeline.
CUSTOM_SYNC_ROLLBACK is different from
ROLLBACK that applications set defaultly, it runs the same commands as
CUSTOM_SYNC in the runnning commit to reverts all the applied changes.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.