Open cirocosta opened 5 years ago
# syntax=cirocosta/estaleiro image "concourse/s3-resource" { base_image { name = "ubuntu" } file "/opt/resource/check" { from_step "build" { path = "/opt/resource/check" } file "/opt/resource/in" { from_step "build" { path = "/opt/resource/in" } file "/opt/resource/out" { from_step "build" { path = "/opt/resource/out" } } } step "build" { dockerfile = "./s3-resource/dockerfiles/ubuntu/Dockerfile" context = "./s3-resource" target = "builder" source_file "/opt/resource/check" { vcs "git" { repository = "https://github.com/concourse/s3-resource" ref = "master" } } source_file "/opt/resource/in" { vcs "git" { repository = "https://github.com/concourse/s3-resource" ref = "master" } } source_file "/opt/resource/out" { vcs "git" { repository = "https://github.com/concourse/s3-resource" ref = "master" } } }
that whole repetition could just be:
# syntax=cirocosta/estaleiro image "concourse/s3-resource" { base_image { name = "ubuntu" } file "/opt/resource/*" { from_step "build" { path = "/opt/resource/*" } } } step "build" { dockerfile = "./s3-resource/dockerfiles/ubuntu/Dockerfile" context = "./s3-resource" target = "builder" source_file "/opt/resource/*" { vcs "git" { repository = "https://github.com/concourse/s3-resource" ref = "master" } } }
As a way of tackling this, I think we can start with the globing in the steps firts (source_file), and then tackle the "in-image" later
glob
source_file
did it for source_file 👍
that whole repetition could just be: