Continuous Integration (CI) runs can be triggered in several ways:
- Automatically when a pull request is submitted to your LookML project's repository by a Looker developer (see the Creating a Continuous Integration suite page for information on setting this up).
- Manually triggering a new run of a CI suite from the Looker IDE.
- Manually re-running a previous CI run from the Looker IDE.
Once the validation tests have completed, you can review the results, as described on the Viewing Continuous Integration run results documentation page.
Automatic triggering from pull requests
If you have enabled your CI suite with Trigger on pull requests from Looker , CI will trigger a validation run automatically when a Looker developer submits a pull request to your LookML repository. (You can optionally specify that pull requests only to certain branches in your repository should trigger automatic CI runs.)
For automatic pull request validation runs, CI validates the latest pull request commit and returns all of the errors in that version of the repository.
See the Viewing Continuous Integration run results documentation page for information on viewing the results.
Manually triggering a new run of a CI suite
A Looker user with the see_ci
permission can manually trigger a CI run from the Looker IDE.
To manually trigger a new run of a CI suite, follow these steps:
- From the Looker IDE , click the Continuous Integrationicon from the IDE navigation bar.
- Click Suitesto open the Suitespage.
- Click the Run suitebutton for the CI suite that you want to run (if you don't have any CI suites for your project, you can create a CI suite ).
-
In the Trigger a run manuallydialog, use the Workspaceoptions to select the branch that you want to validate (see the Workspace section for details):
- To validate the production version of your LookML project, click Production.
- If you want to validate a development branch of your LookML project, click Dev Mode. Use the Branchpull-down menu to select which development branch to validate.
-
To trigger the run of the CI suite, click Start run.
The CI suite may take several minutes to complete running, depending on the size of your project, the validators that are included in the CI suite, and the configuration of the CI suite.
After you trigger a run, the Looker IDE will display the Runpage for the suite that you triggered. Once the validation tests are completed, the Runpage will show the results for each of the validators. You can navigate away from the Runpage while the validation tests are running, and then later return to the Runpage to see the results.
See the Viewing Continuous Integration run results documentation page for information on viewing the results.
Workspace
When you manually trigger a CI run, you can use the Workspaceoptions to validate either the production version of your repository or a development branch of your repository.
For the Productionoption, if you want to identify which branch or commit is used for the production version, you can look in the Looker IDE in the Default Production Branchfield of the Git Summarysection of the Branch Management page of the Project Settings:
- For projects configured with advanced deploy mode
, the production version is a commit or tag that is selected in the deployment manager
by a Looker developer who has the
deploy
permission . - For projects without advanced deploy mode, the production version is the branch configured in the Git Production Branch Namefield in the Project Configurationpage of the Project Settings .
For the Dev Modeoption, note the following for validating development branches in your project:
- To see the branches in your LookML project and to identify the production branch and the personal branches of your developers, refer to the Branch Management page of the Project Settingsof your project in the Looker IDE.
- To validate a development branch, the development branch must be pushed to your LookML repository. In the Looker IDE, that means the developer must click the Commit Changes & Push button or select the Commitoption from the Git Actions panel in the IDE.
Manually re-running a previous CI run
For runs that have finished (if the run passed, failed, errored, or was cancelled), a Looker user with the see_ci
permission can manually trigger a rerun of the CI run from the Looker IDE:
- If you rerun a PR-triggered run, Continuous Integration runs against the same commit as the original run.
- If you rerun a manually-triggered run, Continuous Integration runs against the production state or branch HEAD at the time of the rerun , which will include any subsequents commits that were made since the initial CI run.
In addition, if you have edited the CI suite since the initial run, a rerun will include any changes that you made to the CI suite since the initial run.
To rerun a CI run, follow these steps:
- From the Looker IDE , click the Continuous Integrationicon from the IDE navigation bar.
- Click Runsto open the Runspage.
- On the Runspage, click the View Runbutton for the CI run you want to cancel.
- On the run results page for the selected run, click the Rerunbutton at the top of the page.
Once you click Rerun, the Content Validator will initiate the run and return you to the Runpage for the new run.
See the Viewing Continuous Integration run results documentation page for information on viewing the results.
Cancelling a CI run
If you want to cancel a CI run that is running, you can do so from its Runpage by following these steps:
- From the Looker IDE , click the Continuous Integrationicon from the IDE navigation bar.
- Click Runsto open the Runspage.
- On the Runspage, click the View Runbutton for the CI run you want to cancel.
- On the Runpage for the selected run, click the Cancelbutton at the top of the page.
Once you click Cancel, Continuous Integration will cancel the run display the Cancelledstatus on the Runpage.