{"id":19096543,"url":"https://github.com/sapcc/concourse-swift-resource","last_synced_at":"2025-04-30T14:14:11.748Z","repository":{"id":3956454,"uuid":"48131369","full_name":"sapcc/concourse-swift-resource","owner":"sapcc","description":"A concourse resource for interacting with OpenStack Swift","archived":false,"fork":false,"pushed_at":"2025-04-04T09:28:32.000Z","size":295,"stargazers_count":6,"open_issues_count":2,"forks_count":7,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-04-19T03:36:13.484Z","etag":null,"topics":[],"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/sapcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2015-12-16T19:46:23.000Z","updated_at":"2025-04-04T09:28:35.000Z","dependencies_parsed_at":"2023-12-15T03:36:52.973Z","dependency_job_id":"d51f9c8e-0cf8-4e44-ba28-410e7ce9dcfd","html_url":"https://github.com/sapcc/concourse-swift-resource","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fconcourse-swift-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fconcourse-swift-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fconcourse-swift-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fconcourse-swift-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapcc","download_url":"https://codeload.github.com/sapcc/concourse-swift-resource/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251718556,"owners_count":21632504,"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","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":[],"created_at":"2024-11-09T03:37:02.239Z","updated_at":"2025-04-30T14:14:11.703Z","avatar_url":"https://github.com/sapcc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Concourse resource for OpenStack Swift\n\nVersions objects in a Swift container, by pattern-matching filenames to identify\nversion numbers.\n\nThis resource is heavily inspired by the [official S3 resource](https://github.com/concourse/s3-resource)\n\n## Adding to your pipeline\n\nTo use the Swift Resource, you must declare it in your pipeline as a resource type:\n\n```yaml\nresource_types:\n- name: swift\n  type: docker-image\n  source:\n    repository: databus23/concourse-swift-resource\n```\n\n## Alternatively add resource with BOSH to Concourse\n\nIn your bosh deployment manifest, add to the following to the `groundcrew.additional_resource_types`:\n\n```yaml\n- image: docker:///databus23/concourse-swift-resource\n  type: swift\n```\n\n## Source Configuration\n\n* `auth_url`: *Required.* The url for authentication (Keystone)\n\n* `username`: *Required.* The username to use when accessing the\n  container.\n\n* `api_key`: *Required.* The password of the given user.\n\n* `domain`: *Required.* The domain of the user\n\n* `tenant_id`: *Required.* The project id\n\n* `container`: *Required* The swift container\n\n* `regex`: *Required* The pattern to match filenames against. The first\n  grouped match is used to extract the version. The extracted version\n  needs to be parseable by [go-version](https://github.com/hashicorp/go-version)\n\n* `disable_tls_verify`: Disable certificate verification for https connections to keystone and swift. Default: false\n\n## Behaviour\n\n### `check`: Extract versions from the container\n\nObjects will be found via the pattern configured by `regex`. The versions\nwill be used to order them (using [semver](http://semver.org/)). Each\nobject's filename is the resulting version.\n\n### `in`: Fetch an object from the container\n\nPlaces the following files in the destination:\n\n* `$objectname`: The object fetched from the container.\n* `filename`: Contains the filename of the fetched object ($objectname).\n* `version`: Contains the version extracted from the file name.\n\n#### Parameters\n\n*None.*\n\n### `out`: Upload an object to the container\n\nGiven a path specified by `from`, upload it to the Swift container. The path must identify a single file. The filename must conform to the `regex` specified in the resource.\n\n#### Parameters\n\n* `from`: *Required.* A regexp specifying the file to upload.\n\n* `segment_container` : *Optional* Name of the container where segments should be stored. Segments will be created for files larger than 1 GB. (Default: ${container}_segments)\n* `segment_size`: *Optional* Size of segments (Default: 1073741824 Byte) (1 GB)\n* `delete_after`: *Optional* Instruct Swift to schedule automatic deletion of the Object in `n`seconds (Default: disabled). Useful to define Object retention policies.\n\n## Example Configuration\n\n### Resource\n\n```yaml\n- name: myapp\n  type: swift\n  source:\n    username: user\n    api_key: secret\n    auth_url: http://somewhere.at.keystone:5000/v3\n    domain: somedomain\n    container: mycontainer\n    regex: myapp-([.0-9])+\\.tgz\n    tenant_id: tenantid\n```\n\n### Plan\n\n``` yaml\n- get: myapp\n```\n\n``` yaml\n- put: myapp\n  params:\n    from: a-task/build/path/file-(.*).tgz\n    segment_container: mysegmentcontainer\n    segment_size: 1073741824\n    delete_after: 3600\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fconcourse-swift-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapcc%2Fconcourse-swift-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fconcourse-swift-resource/lists"}