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

Add custom sync stage #4223

Merged
merged 22 commits into from
Mar 9, 2023
Merged

Add custom sync stage #4223

merged 22 commits into from
Mar 9, 2023

Conversation

kevin-namba
Copy link
Contributor

@kevin-namba kevin-namba commented Feb 24, 2023

What this PR does / why we need it:
Add custom sync executor to support deploy tools other than terraform.

apiVersion: pipecd.dev/v1beta1
kind: LambdaApp
spec:
  name: simple
  labels:
    env: example
    team: abc
  planner:
    alwaysUsePipeline: true
  pipeline:
    stages:
      - name: CUSTOM_SYNC
        desc: "test"
        with:
          timeout: 10m
          envs:
            AWS_PROFILE: "piped-test"
          run: |
            sam build
            echo y | sam deploy --profile $AWS_PROFILE

Which issue(s) this PR fixes:

Fixes part of #1089

Does this PR introduce a user-facing change?:

Add custom stage that users can define how the stage works

@kevin-namba kevin-namba changed the title [WIP] Add custom stage Add custom stage Feb 28, 2023
pkg/app/piped/executor/custom/custom.go Outdated Show resolved Hide resolved
pkg/app/piped/executor/custom/custom.go Outdated Show resolved Hide resolved
pkg/model/stage.go Outdated Show resolved Hide resolved
@khanhtc1202
Copy link
Member

Guys, I started to think that should we rename this to BIN_EXEC or SCRIPT_RUNNING, since the stage named CUSTOM_STAGE is a bit too common and may be hard for us later when we want to add new kinds of stages. wdyt?

@kevin-namba
Copy link
Contributor Author

Guys, I started to think that should we rename this to BIN_EXEC or SCRIPT_RUNNING, since the stage named CUSTOM_STAGE is a bit too common and may be hard for us later when we want to add new kinds of stages. wdyt?

I agree with your opinion. This stage includes only running scripts but users can not customize the stage.

@kevin-namba kevin-namba changed the title Add custom stage Add custom sync stage Mar 3, 2023
pkg/model/stage.go Outdated Show resolved Hide resolved
Copy link
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

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

Nice work! Thank you 🙌

@khanhtc1202 khanhtc1202 merged commit 6153240 into master Mar 9, 2023
@khanhtc1202 khanhtc1202 deleted the add-custom-stage branch March 9, 2023 10:24
@github-actions github-actions bot mentioned this pull request Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants