Regex does not match provided version

#1

Am running into an issue with a new pipeline I’ve just set up. I’ve set up similar before so I’m not quite sure what I’m doing differently.

pipeline.yml

resources:
- name: config
  type: s3
  source:
    access_key_id: ((minio.username))
    bucket: ((minio-bucket))
    endpoint: ((minio-url))
    regexp: fe-configs/configs-*.tar
    secret_access_key: ((minio.passowrd)

(other git resources)

jobs:
- name: clean-and-push
  serial: true
  plan:
  - aggregate:
    - get: build-scripts (git resource)
    - get: git-configs (git resource)
      trigger: true
    - task: clean-configs
      file: build-scripts/tasks/clean-configs.yml
      params:
      input_mapping:
        concourse-repo: build-scripts
        repo: git-configs
    - put: config
      params:
        file: configs/configs-*.tar

clean-configs.yml just launches a script that zips up configs and puts them in a folder. The * in the regex is for the git hash I put in the name.

My pipeline puts the tar in minio but then spits out an error at the last second:
error running command: regex does not match provided version: s3resource.Version(Path: “fe-configs/configs-d371bveg1224g3vhg4v2hg3v.tar”, VersionID:"")
Which is a bit confusing since I’m not even using versions, nor does Minio support them.

Concourse 5.0.0

0 Likes

#2

From a quick look, you have

regexp: fe-configs/configs-*.tar
...
file: configs/configs-*.tar

this might be the reason

0 Likes

#3

I believe the former represents where to store the file in minio (s3), and the latter represents where the file to be uploaded is located.

0 Likes

#4

Figured it out. I needed to use capture groups.
regexp: fe-configs/configs-*.tar
needed to become
regexp: fe-configs/configs-(.*).tar

0 Likes