CI/CD variables are a useful way to customize pipelines based on their environment. But what if you need to override a variable, or what if you need to run a pipeline manually? These scenarios can create problems.

Having to enter variables and values manually is tedious and prone to error. Also, a user may not know all the different variables/values they need to enter. In GitLab 13.7, we’re introducing a feature that helps to solve these problems by generating pre-filled variables from your .gitlab-ci.yml. file when you run a pipeline.

What are CI/CD variables?

CI/CD variables are dynamic values assigned to environments. These environment variables affect the way running processes behave on an operating system. Variables allow teams to customize jobs in GitLab CI/CD.

There are two places where teams can define variables:

CI/CD variables can be very useful, but what if you need to override a variable or manually run a pipeline? You might do this if the results of a pipeline (for example, a code build) are required outside the normal operation of the pipeline. Teams may also opt for manual deployments to production and need to stop the pipeline early. Running a pipeline manually isn’t unusual, but defining variables and entering them in a manual pipeline hasn’t always been a totally smooth process.

First, teams need to run a pipeline/job manually and then navigate into the overview. Then, they have to select all the required variables from a drop-down menu on the “Run Pipeline” page. If developers don’t know all the required variables by heart, they will need to check their references and switch back and forth. If there are numerous key/value pairs to enter, this can be especially tedious.

What are pre-filled variables?

In 13.7, we’re introducing a feature that will streamline this process. Now the “Run pipeline” form will generate pre-filled variables for your pipeline based on the variable definitions in your .gitlab-ci.yml file. The response to this feature from the GitLab community was enthusiastic.

pre-filled variables issue People are excited about pre-filled variables!

The benefits of pre-filled variables

Having variables pre-filled is all about increasing efficiency and reducing the small frustrations that make jobs more difficult than they need to be.

Pre-filled variables will reduce:

Run Pipeline Pre-filled variables in action

For teams that manually deploy to production, pre-filled variables will make it easier during that review step so that everyone with permissions can manually trigger the deployment pipeline. If the reviewer needs to make an exception they can override a variable, if necessary.

Pre-filled variables will help teams save time, reduce errors, and make the manual pipeline process a bit smoother. Do you think we're missing something or have ways that we can streamline the process even further? Leave a comment in the issue and let us know what you think. Everyone can contribute.

Other future GitLab CI releases

Pre-filled variables are only one CI feature in the works. We release new features on the 22nd of every month, and everyone can contribute to these public issues.

More on CI/CD

Cover image by Gerrie van der Walt on Unsplash

Try all GitLab features - free for 30 days

GitLab is more than just source code management or CI/CD. It is a full software development lifecycle & DevOps tool in a single application.

Try GitLab Free
Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license

Try the GitLab DevOps Platform for free for 30 days

Achieve higher productivity, faster and secure deployments

Start your free trial Maybe later