{"id":36441392,"url":"https://github.com/trecnoc/nexus-resource","last_synced_at":"2026-01-11T21:58:31.701Z","repository":{"id":57560962,"uuid":"248841429","full_name":"trecnoc/nexus-resource","owner":"trecnoc","description":"Concourse Nexus Resource","archived":false,"fork":false,"pushed_at":"2023-02-23T16:31:17.000Z","size":73,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-06-20T18:53:12.430Z","etag":null,"topics":["concourse","concourse-resource","go"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/trecnoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2020-03-20T20:00:11.000Z","updated_at":"2023-05-08T17:12:27.000Z","dependencies_parsed_at":"2024-06-20T18:21:25.355Z","dependency_job_id":null,"html_url":"https://github.com/trecnoc/nexus-resource","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/trecnoc/nexus-resource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trecnoc%2Fnexus-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trecnoc%2Fnexus-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trecnoc%2Fnexus-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trecnoc%2Fnexus-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trecnoc","download_url":"https://codeload.github.com/trecnoc/nexus-resource/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trecnoc%2Fnexus-resource/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28324668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["concourse","concourse-resource","go"],"created_at":"2026-01-11T21:58:31.215Z","updated_at":"2026-01-11T21:58:31.693Z","avatar_url":"https://github.com/trecnoc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexus Resource\n\n![](https://github.com/trecnoc/nexus-resource/workflows/CI/badge.svg?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/trecnoc/nexus-resource)](https://goreportcard.com/report/github.com/trecnoc/nexus-resource)\n\nVersions objects in a Nexus repository of type Raw only, by pattern-matching\nfilenames to identify version numbers.\n\n## Source Configuration\n\n* `url`: *Required.* The url of the Nexus server.\n\n* `repository`: *Required.* The name of the repository.\n\n* `username`: *Required.* The username for access the repository.\n\n* `password`: *Required.* The password for access the repository.\n\n* `group`: *Required for check and out.* The repository artifact group, supports\n  Glob patterns for `check`.\n\n* `regexp`: *Required.* The pattern to match artifact name against within Nexus;\n  this regex should match the full name of the files, which consists of the\n  `group` minus the leading '/'. The first grouped match is used to extract the\n  version, or if a group is explicitly named `version`, that group is used. At\n  least one capture group must be specified, with parentheses.\n\n  The version extracted from this pattern is used to version the resource.\n  Semantic versions, or just numbers, are supported. Accordingly, full regular\n  expressions are supported, to specify the capture groups.\n\n* `timeout`: *Optional defaults to `10`.* Timeout for the internal HTTP Client in\n  seconds.\n\n* `debug`: *Optional defaults to `false`.* Debug flag for enabling logging and\n  request file output in `/tmp`.\n\n## Behavior\n\n### `check`: Extract versions from the repository.\n\nArtifacts will be found via the pattern configured by `regexp` in the provided\n`group`. The versions will be used to order them (using [semver](http://semver.org/)).\nEach artifact's filename is the resulting version.\n\n### `in`: Fetch an artifact from the repository.\n\nPlaces the following files in the destination:\n\n* `(filename)`: The file fetched from the repository.\n\n* `sha`: A file containing the SHA of the artifact.\n\n* `url`: A file containing the URL of the artifact.\n\n* `version`: The version identified in the file name.\n\n#### Parameters\n\n* `skip_download`: *Optional.* Defaults to `false`. Skip downloading object from\n  Nexus. Value need to be a true/false string.\n\n* `unpack`: *Optional.* Defaults to `false`. If true and the file is an archive\n  (tar, gzipped tar, other gzipped file, or zip), unpack the file. Gzipped\n  tarballs will be both ungzipped and untarred.\n\n### `out`: Upload an object to the repository.\n\nGiven a file specified by `file`, upload it to the Nexus repository in the\nprovided `group`.\n\n#### Parameters\n\n* `file`: *Required.* Path to the file to upload, provided by an output of a task.\n  If multiple files are matched by the glob, an error is raised. The matching\n  syntax is bash glob expansion, so no capture groups, etc.\n\n## Example Configuration\n\n### Resource\n\nWhen the file has the version name in the filename\n\n``` yaml\n- name: release\n  type: nexus\n  source:\n    url: http://127.0.0.1\n    repository: repositoryName\n    group: /path/to\n    regexp: path/to/release-(.*).tgz\n```\n\n### Plan\n\n``` yaml\n- get: release\n```\n\n``` yaml\n- put: release\n  params:\n    file: path/to/release-*.tgz\n```\n\n## Developing on this resource\n\nFirst get the resource via:\n`go get github.com/trecnoc/nexus-resource`\n\n## Development\n\n### Prerequisites\n\n* golang is *required* - version 1.14.x is tested; earlier versions may also\n  work.\n* docker is *required* - version 19.03.x is tested; earlier versions may also\n  work.\n\n### Local\n\nGenerate the Fakes with Counterfeiter if running tests locally or use the provided\nscrips in the `scripts` folder.\n\nCounterfeiter can be run with `go generate ./...`\n\n### Docker\n\n#### Running the tests\n\nThe tests have been embedded with the `Dockerfile`; ensuring that the testing\nenvironment is consistent across any `docker` enabled platform. When the docker\nimage builds, the test are run inside the docker container, on failure they\nwill stop the build.\n\nRun the tests with the following commands:\n\n```sh\ndocker build -t nexus-resource -f Dockerfile .\n```\n\n##### Integration tests\n\nThe integration requires access to a Nexus server with a Raw repository.\nThe `docker build` step requires setting `--build-args` so the integration will run.\n\nRun the tests with the following command:\n\n```sh\ndocker build . -t nexus-resource -f Dockerfile \\\n  --build-arg NEXUS_TESTING_URL=\"some-url\" \\\n  --build-arg NEXUS_TESTING_USERNAME=\"some-username\" \\\n  --build-arg NEXUS_TESTING_PASSWORD=\"some-password\" \\\n  --build-arg NEXUS_TESTING_REPOSITORY=\"some-repository\"\n```\n\n### Contributing\n\nPlease make all pull requests to the `master` branch and ensure tests pass\nlocally.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrecnoc%2Fnexus-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrecnoc%2Fnexus-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrecnoc%2Fnexus-resource/lists"}