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

Adding a new job which is not part of the Pipeline Template #3128

Closed
VonnyJap opened this issue May 30, 2024 · 0 comments
Closed

Adding a new job which is not part of the Pipeline Template #3128

VonnyJap opened this issue May 30, 2024 · 0 comments
Assignees
Labels
pipeline-template subtask issue that is categorized as subtask of another issue
Milestone

Comments

@VonnyJap
Copy link
Member

What happened:

Users occasionally need to add more jobs to the pipeline, beyond those included in the pipeline template. Currently, this feature is not supported in the pipeline template.

What you expected to happen:

Given this config in pipeline template:

namespace: sd-test
name: example-template
version: '1.0.0'
description: An example pipeline template for testing golang files
maintainer: foo@bar.com
config:
  shared:
    image: node:10
    environment:
      VAR1: "one"
      VAR2: "two"
    steps:
      - init: npm install
      - test: npm test
  jobs:
    main:
      requires: [~pr, ~commit]
    second:
      requires: [main]

and user defined pipeline as illustrated below:

template: sd-test/example-template@latest
jobs:
    new:
      requires: [~commit]
      image: node:20
      steps:
        - init: echo "init step" && npm install
    second:
      requires: [new]

the expanded final config would be:

jobs:
  main:
    	requires: [~pr, ~commit]
        image: node:10
        steps:
          - init: echo "init step" && npm install
          - test: npm test
        environment:
          VAR1: "one"
          VAR2: "two"
  new:
        requires: [~commit]
        image: node:20
        steps:
          - init: echo "init step" && npm install
second:
        requires: [new]
        image: node:10
        steps:
          - init: npm install
          - test: npm test
        environment:
          VAR1: "one"

The above implementation has below prerequisites:

  • Shared config from the pipeline template is flattened into the jobs
  • Shared config in the user pipeline is only affecting the new jobs if they are not allowed to be customized. Current customizable shared configs are image, settings, environment.
  • User is able to make modifications in the pipeline pertaining to job related fields, i.e. require

How to reproduce it:

This is new feature request so it is not reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pipeline-template subtask issue that is categorized as subtask of another issue
Projects
Development

No branches or pull requests

3 participants