Pipelines Extensions Tutorial - Example Pipeline

JFrog Pipelines Documentation

Products
JFrog Pipelines
Content Type
User Guide
ft:sourceType
Paligo

The example pipeline MyHealthCheck is in the pipeline branch of the repository. The MyHealthCheck pipeline will test the newly added step and resource extensions.

pipeline.yml

resources:
  - name: MyGitHub
    type: GitRepo
    configuration:
      path: jfrogtw/jfrog-pipelines-extensions-sample    # <-- Change to your repository path
      gitProvider: tw_github                             # <-- Change to your GitHub integration
      
  - name: MyTest
    type: tutorials/test
    configuration:
      alpha: "JFrog"
      number: 42
      flag: true

pipelines: 
  - name: MyHealthCheck
    configuration:
      environmentVariables:
        readOnly:
          my_env_var: "hello" 
    steps:
      - name: Health_Check_Step
        type: tutorials/HealthCheck
        configuration:
          healthCheckUrl: "https://jfrog.com"
          notifyOnSuccess: false
          notifyOnFailure: false
          stuff: 
           - "This is a string"
           - "This is another string"
          inputResources:
           - name: MyTest
           - name: MyGitHub
Add the Pipeline Source

To load the example pipeline in your Pipelines deployment, add the pipeline branch of the repository as a Single Branch Pipeline Source.

If you have not already, you will need to add an integration for your GitHub account. Note that this is in addition to the administration integration added above (even though it is for the same account).

image2020-9-14_13-40-25.png

When you click Create Source, the Pipelines DSL file will be synced from the newly added pipeline source. When completed, you can view the Logs for the sync.

image2020-9-14_13-45-45.png
Run the Example Pipeline

The newly loaded pipeline MyHealthCheck can be seen in the My Pipelines view.

Extensions_MyPipelines_29nov21.png

Click on MyHealthCheck to view its Pipeline History. You can click on the pipeline's single Health_Check_Step to trigger a run of the pipeline.

extension_trigger_29nov21.png