Go to file
yminer 645f088c1f pass DRAGONFLY_AUTH_TOKEN env for robot case running
Signed-off-by: yminer <miner.yang@broadcom.com>
2025-01-14 09:13:44 +00:00
docs fix: migrate corporate harbor to "registry.goharbor.io" 2024-07-12 10:55:21 +08:00
pipelines fix: update master to main 2023-09-04 09:36:15 +08:00
resources/io/goharbor pass DRAGONFLY_AUTH_TOKEN env for robot case running 2025-01-14 09:13:44 +00:00
src/io/goharbor fix: migrate corporate harbor to "registry.goharbor.io" 2024-07-12 10:55:21 +08:00
vars fix: update slack channel 2023-02-22 18:28:59 +08:00
LICENSE Initial commit 2021-04-22 10:42:50 +08:00
README.md fix: update master to main 2023-09-04 09:36:15 +08:00

README.md

Jenkins Shared Library

The experimental shared libraries for running E2E tests against Harbor instance(2.3+) on Jenkins.

Prerequisites

Runs As Jenkins Shared Library

  1. Register this repository as the Global Pipeline Libraries(named harbor) in Jenkins according to this guide.

  2. Import the registered library in Jenkinsfile:

    // import main branch to run cases against Harbor instance deployed from main branch
    @Library('harbor@main') _
    
    // import 2.3 branch to run cases against Harbor instance v2.3.x
    @Library('harbor@2.3') _
    

    Notes: Import the corresponding branch of the library for the Harbor instance to be tested. e.g. for Harbor v2.3.x importing branch 2.3

  3. Use the libraries in Jenkinsfile

    @Library('harbor@main') _
    import io.goharbor.*
    
    node() {
        HarborInstance instance = new HarborInstance()
        instance.coreServiceURL = "https://harbor.local"
        instance.notaryServiceURL = "https://notary.harbor.local"
    
        stage('Health-Check') {
            check_health(instance)
        }
        stage('Test') {
            CaseSettings caseSettings = new CaseSettings()
            caseSettings.branch = "main"
            run_test_case(instance, caseSettings, "workdir")
        }
        stage('Publish-Result') {
            publish_test_result("workdir/result")
        }
    }
    

Libraries

Pipelines