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: improve depends_on in workspace steps #87

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bongnv
Copy link

@bongnv bongnv commented Apr 1, 2022

Currently, if a workspace step depends on a project step, the plugin will generate an incorrect pipeline. For example:

  - label: build
    key: build
    branches: "master"
    env:
      BUILDPIPE_SCOPE: project
      TEST_ENV_STEP: test-step
    command:
      - cd $$BUILDPIPE_PROJECT_PATH
      - make build
      - make publish-image
    agents:
      - queue=build
    depends_on:
      - bootstrap # the rendered template should not include the project name for a non-project step
      - test # the rendered template should include the project name for a project-scoped step
  - label: tag
    branches: "master"
    depends_on:
      - bootstrap
      - build

depends_on in tag step won't be updated into build:project1 and build:project2.

This PR aims to improve this behaviour. Please take a look at the test to see how it will be updated.

Note: make quality stops working with the latest version of golangci-lint so I added .golangci.yaml and updates some code to fix some lint error.

golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f h1:rlezHXNlxYWvBCzNses9Dlc7nGFaNMJeqLolcmQSSZY=
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Copy link
Author

Choose a reason for hiding this comment

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

Needs to update golang.org/x/sys for the project to work with Go 1.18. (ref)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants