Search code examples
jfrog-pipelines

How to use JFrog pipelines build image from local artifactory?


Everytime i run my build in jfrog pipelines, i see that the build image is being pulled from releases-docker.jfrog.io. Would like to instead pull the image from my own artifactory instance to reduce time.

Here is my sample test pipeline:

pipelines:
  - name: testSimple_1
    steps:
      - name: testSimple
        type: Bash
        configuration:
          runtime:
            type: image
            image:
              custom:
                name: releases-docker.jfrog.io/jfrog/pipelines-u18node
                tag: "16"
        execution:
          onExecute:
            - echo "executing step ..."

Solution

  • You can try the following steps to achieve this,

    1. Create a remote artifactory repo in your instance by pointing the url to https://releases-docker.jfrog.io/
      Sample input,
        Repository Key : myreleasesremote
        URL : https://releases-docker.jfrog.io/
    
    1. Create a pipelines integration of type "Docker Registry" with required input,
      Sample input,
        Name : myregistry
        url : https://<your_docker_registry_dns>/myreleasesremote
        User Name : <your_artifactory_username>
        Password : <your_artifactory_apikey>
    
    1. Update the pipelines source yaml to point to your new remote docker repo,
    pipelines:
      - name: testSimple_1
        steps:
          - name: testSimple
            type: Bash
            configuration:
              runtime:
                type: image
                image:
                  custom:
                    name: <your_docker_registry_dns>/myreleasesremote/jfrog/pipelines-u18node
                    tag: "16"
                    sourceRepository: myreleasesremote
                    registry: myregistry