Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 36,918
    • Issues 36,918
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,548
    • Merge requests 1,548
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #207484

Closed
Open
Created Feb 21, 2020 by Kamil Trzciński@ayufan🔴Maintainer

Allow to not inherit defaults as part of job/bridge

Problem to solve

This is proposal to add additional YAML option that allows to disable inheritance of defaults and global yaml variables for a particular job:

default:
  image: ruby:2.1

dast:
  inherit:
    default: true/false # true by default
    variables: true/false # true by default
  script: echo Hello World

Currently, in order to disable the inheritance you have to manually overwrite each setting. This is also impossible to stop the inheritance of variables: as variables can also affect the behaviour of job, due to special type variables like CI_CLONE_PATH:

checks:
  stage: .post
  tags:
    - linux-default
  before_script: [] #override and before after scripts
  after_script: [] #override and before after scripts
  dependencies: [] 

The future

Allow the inherit: to fine tune what will be inherited:


default:
  before_script: echo Hello World
  image: ruby:2.1

variables:
  DOMAIN: my-domain.com
  KEY: value

dast:
  inherit:
    default: [image] # inherit only `image:`, but not `before_script`
    variables: [DOMAIN] # inherit only `DOMAIN`, but not `key`
  script: echo Hello World

Intended users

  • Sasha (Software Developer)
  • Devon (DevOps Engineer)

Links / references

Edited Mar 04, 2020 by Kamil Trzciński
Assignee
Assign to
12.9
Milestone
12.9 (Past due)
Assign milestone
Time tracking
None
Due date
None