Giter Club home page Giter Club logo

bmc-ami-gitlab-templates's Introduction

BMC GitLab Remote Templates

In GitLab using the include keyword allows the inclusion of external YAML files. This helps to break down the CI/CD configuration into multiple files and increases readability for long configuration files. It’s also possible to have template files stored in a central repository and projects include their configuration files. This helps avoid duplicated configuration, for example, global default variables for all projects.

include requires the external YAML file to have the extensions .yml or .yaml, otherwise the external file won’t be included.

BMC Remote Templates

The templates in this repository can be used as remote template in the GitLab CI yaml.

How to Use the BMC remote template?

It is very simple to use these templates in your CI yaml. It can be done using include:remote in the GitLab CI YAML. include:remote can be used to include a file from a different location, using HTTP/HTTPS, referenced by using the full URL. The remote file must be publicly accessible through a simple GET request as authentication schemas in the remote URL are not supported. For example including strobemeasurement using remote template:

include:
  - remote: 'https://raw.githubusercontent.com/bmcsoftware/bmc-gitlab-remote-templates/master/templates/job/strobemeasurement.gitlab-ci.yml'

We can provide multiple remotes in list format to add more number of remote templates.

A Sample GitLab CI YAML using strobemeasurement template

gitlab-ci.yml

---
include:
  remote: 'https://www.github.com/bmcsoftware/master/templates/strobemeasurement.gitlab-ci.yml'

stages:
  - "strobe"

strobemeasurementjob:
  stage: strobe
  extends: .strobemeasurement
  tags:
    - windowstest
  variables :
    jobstage: strobe
    selectedHostName: 'cw09'
    requestType: 'addQueue'
    system: 'cw09'
    jobName: 'PINXXX'
    tags: 'test'
    profile: 'TEST'
    email: 'youremail'
    duration: '5'
    limit: 'nolimit'
    finalAction: 'stop'
    method: 'GET'
    url: 'https://url'
    returnURL: 'https://returnURL'

extends keyword used to inherit jobs defined in template file.Pass stage (eg. build,test etc) in jobstage variable to the Job.

bmc-ami-gitlab-templates's People

Contributors

pramodc0777 avatar mayank146009 avatar

Watchers

Brendan Farrell avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.