{"id":29859358,"url":"https://github.com/gocd/docker-registry-artifact-plugin","last_synced_at":"2025-07-30T02:13:07.634Z","repository":{"id":31228419,"uuid":"127281324","full_name":"gocd/docker-registry-artifact-plugin","owner":"gocd","description":" The docker registry artifact plugin provides a way to push and pull docker images on GoCD","archived":false,"fork":false,"pushed_at":"2025-07-25T05:16:07.000Z","size":2189,"stargazers_count":22,"open_issues_count":6,"forks_count":14,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-07-25T10:46:02.468Z","etag":null,"topics":["docker","docker-registry","gocd","gocd-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gocd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-29T11:21:47.000Z","updated_at":"2025-07-25T05:14:25.000Z","dependencies_parsed_at":"2024-02-10T01:22:41.826Z","dependency_job_id":"c5a07144-a916-4483-b3d7-c7376ced4c15","html_url":"https://github.com/gocd/docker-registry-artifact-plugin","commit_stats":null,"previous_names":[],"tags_count":464,"template":false,"template_full_name":null,"purl":"pkg:github/gocd/docker-registry-artifact-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocd%2Fdocker-registry-artifact-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocd%2Fdocker-registry-artifact-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocd%2Fdocker-registry-artifact-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocd%2Fdocker-registry-artifact-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gocd","download_url":"https://codeload.github.com/gocd/docker-registry-artifact-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocd%2Fdocker-registry-artifact-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267797774,"owners_count":24145711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-registry","gocd","gocd-plugin"],"created_at":"2025-07-30T02:13:05.778Z","updated_at":"2025-07-30T02:13:07.622Z","avatar_url":"https://github.com/gocd.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Registry Artifact plugin\n\nThe docker registry artifact plugin provides a way to push and pull docker images on GoCD \n\n## Getting started\n\n### Requirements\n\n- GoCD Server 18.7+\n- Docker registry\n- Docker daemon\n\n### Installation\n\n* Download the right version of the plugin from [the Releases](https://github.com/gocd/docker-registry-artifact-plugin/releases) page. The direct link to the latest released version is: https://github.com/gocd/docker-registry-artifact-plugin/releases/latest\n* Copy the file `build/libs/docker-registry-artifact-plugin-VERSION.jar` to the GoCD server under `${GO_SERVER_DIR}/plugins/external` and restart the server. * The `GO_SERVER_DIR` is usually `/var/lib/go-server` on Linux and `C:\\Program Files\\Go Server` on Windows.\n\n### Configuration\n\nThere are three levels of configuration needed in order for publishing and fetching a docker image as an artifact.\n\n#### Configure the Artifact Store\n\n1. Login to GoCD server as admin and navigate to Admin \u003e Artifact Stores\n2. Click on `Add` to add the store details for the plugin.\n   - Specify the store id\n   - Choose the docker registry artifact plugin\n   - Specify the `Docker Registry Url`\n   - Specify the `Registry Type`\n   - Specify registry details\n\n   If `Registry Type` is `ecr`:\n\n   ![](images/artifact_store_ecr.png)\n\n   If `Registry Type` is `other`:\n\n   ![](images/artifact_store_other.png)\n\n###### Artifact Store Properties\n\n| Properties                     | Description                                                              | Mandatory                |\n| -------------------------------| ------------------------------------------------------------------------ | ------------------------ |\n| `RegistryType`                 | Can be either `ecr` or `other`                                           | `yes`                    |\n\nIf `RegistryType` is `ecr`:\n\n| Properties                     | Description                                                              | Mandatory                |\n| -------------------------------| ------------------------------------------------------------------------ | ------------------------ |\n| `RegistryID`                   | ECR registry id to push and pull images                                  | `yes`                    |\n| `AWSRegion`                    | The aws region key to execute ecr get authorization token request        | `yes`                    |\n| `AWSAccessKeyId`               | The aws access key id to execute ecr get authorization token request     | `no`                    |\n| `AWSSecretAccessKey`           | The aws secret access key to execute ecr get authorization token request | `no`                    |\n\nNote: If the AWSAccessKeyId and AWSSecretAccessKey are not provided, the following configurations are checked:\n\n- Environment Variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`\n- System Properties `aws.accessKeyId` and `aws.secretKey`\n- Credential profiles file at the default location (~/.aws/credentials)\n- Credentials delivered through the Amazon EC2 container service if AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\" environment variable is set and security manager has permission to access the variable\n- Instance profile credentials delivered through the Amazon EC2 metadata service\n\nIf `RegistryType` is `other`\n\n| Properties                     | Description                                                              | Mandatory                |\n| -------------------------------| ------------------------------------------------------------------------ | ------------------------ |\n| `RegistryURL`                  | Registry to push and pull images                                         | `yes`                    |\n| `Username`                     | Username to authenticate with the docker registry.                       | `yes`                    |\n| `Password`                     | Password to authenticate with the docker registry.                       | `yes`                    |\n\n\n#### Publish artifact config\n\n1. Navigate to the `Artifacts` tab under Stage \u003e Job\n2. Choose artifact type `External`\n   - Specify the `artifact id`.\n   - Specify the `store id` of an existing artifact store\n3. Configure the build specific artifact details.\n   - Optionally specify the `Image` and `Tag`. Usually, the `Tag` can be an environment variable that changes for every build. For example, the `GO_PIPELINE_LABEL` can be used to publish a versioned docker image.\n   - Optionally specify the `BuildFile`. Specify a json file name. The format of the file should be `{\"image\": \"name\", \"tag\": \"tag pattern\"}`. The `BuildFile` option can be used if the `Tag` option cannot be specified for the tag pattern you want to use. The generation of this json file must be handled within the GoCD job.\n   - A private registry has to be part of the image name, like `RegistryURL/Image`.\n\n   ![](images/build_and_publish_image_artifacts.png)\n\n##### Configure the Image in Publish Artifact Config:\n\nAlthough the artifact store contains the registry url or the registry ID (in case of ECR), the image that needs to be published to the registry still needs to be tagged appropriately with the registry information. Otherwise, the docker client will be unable to push the image to the registry.\n\nSpecify the image as shown in the examples below for various container registries:\n\n- DockerHub: `\u003cDOCKERHUB_USERNAME\u003e/image`\n\n- Quay: `quay.io/\u003cusername\u003e/image`\n\n- GCR: `gcr.io/\u003cusername\u003e/image`\n\n- ECR: `\u003cregistry_id\u003e.dkr.ecr.\u003caws_region\u003e.amazonaws.com/image`\n\n\n#### Fetch artifact config\n\nTo pull an image from an upstream pipeline or stage, the following information is required:\n\n1. Specify a `Pipeline Dependency` material if you have an upstream pipeline you want to pull the docker image.\n2. Navigate to `Tasks` tab under Stage \u003e Job\n3. Add a `Fetch Artifact` task\n   -  Choose artifact origin type `External`\n   - Specify the pipeline, stage and job name.\n   - Specify the artifact id of the external artifact that belongs to the upstream job\n\n   ![](images/fetch_artifact_task.png)\n   \n## Troubleshooting\n\n### Enable Debug Logs\n\n#### If you are on GoCD version 19.6 and above:\n\nEdit the file `wrapper-properties.conf` on your GoCD server and add the following options. The location of the `wrapper-properties.conf` can be found in the [installation documentation](https://docs.gocd.org/current/installation/installing_go_server.html) of the GoCD server.\n\n```properties\n# We recommend that you begin with the index `100` and increment the index for each system property\nwrapper.java.additional.100=-Dplugin.cd.go.artifact.docker.registry.log.level=debug\n```\n\nIf you're running with GoCD server 19.6 and above on docker using one of the supported GoCD server images, set the environment variable `GOCD_SERVER_JVM_OPTIONS`:\n\n```shell\ndocker run -e \"GOCD_SERVER_JVM_OPTIONS=-Dplugin.cd.go.artifact.docker.registry.log.level=debug\" ...\n```\n\n#### If you are on GoCD version 19.5 and lower:\n\n* On Linux:\n\n    Enabling debug level logging can help you troubleshoot an issue with this plugin. To enable debug level logs, edit the file `/etc/default/go-server` (for Linux) to add:\n\n    ```shell\n    export GO_SERVER_SYSTEM_PROPERTIES=\"$GO_SERVER_SYSTEM_PROPERTIES -Dplugin.cd.go.artifact.docker.registry.log.level=debug\"\n    ```\n\n    If you're running the server via `./server.sh` script:\n\n    ```shell\n    $ GO_SERVER_SYSTEM_PROPERTIES=\"-Dplugin.cd.go.artifact.docker.registry.log.level=debug\" ./server.sh\n    ```\n\n* On windows:\n\n    Edit the file `config/wrapper-properties.conf` inside the GoCD Server installation directory (typically `C:\\Program Files\\Go Server`):\n\n    ```\n    # config/wrapper-properties.conf\n    # since the last \"wrapper.java.additional\" index is 15, we use the next available index.\n    wrapper.java.additional.16=-Dplugin.cd.go.artifact.docker.registry.log.level=debug\n    ```\n\n## Building the code base\n\nTo build the jar, run `./gradlew clean test assemble`\n\n## License\n\n```plain\nCopyright 2022 Thoughtworks, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n## About the license and releasing your plugin under a different license\n\nThe code in this repository is licensed under the Apache 2.0 license. The license itself specifies the terms\nunder which derivative works may be distributed (the license also defines derivative works). The Apache 2.0 license is a\npermissive open source license that has minimal requirements for downstream licensors/licensees to comply with.\n\nThis does not prevent your plugin from being licensed under a different license as long as you comply with the relevant\nclauses of the Apache 2.0 license (especially section 4). Typically, you clone this repository and keep the existing\ncopyright notices. You are free to add your own license and copyright notice to any modifications.\n\nThis is not legal advice. Please contact your lawyers if needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocd%2Fdocker-registry-artifact-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgocd%2Fdocker-registry-artifact-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocd%2Fdocker-registry-artifact-plugin/lists"}