Skip to content
Permalink
Browse files

publishing

  • Loading branch information...
dpb587 committed Jun 11, 2018
0 parents commit ed337b133bc70ad2119e753d202d11c27344add0
Showing 759 changed files with 365,656 additions and 0 deletions.
2 .envrc
@@ -0,0 +1,2 @@
export GOPATH=$( realpath "$PWD/../../../.." )
export PATH=$GOPATH/bin:$PATH
@@ -0,0 +1 @@
/tmp
@@ -0,0 +1,12 @@
FROM golang:1.10 as resource
WORKDIR /go/src/github.com/dpb587/dynamic-metalink-resource
COPY . .
ENV CGO_ENABLED=0
RUN mkdir -p /opt/resource
RUN git rev-parse HEAD | tee /opt/resource/version
RUN go build -o /opt/resource/check check/*.go
RUN go build -o /opt/resource/in in/*.go

FROM alpine:3.4
RUN apk --no-cache add bash ca-certificates coreutils curl git gnupg openssh-client jq
COPY --from=resource /opt/resource /opt/resource

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,46 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true


[[constraint]]
name = "github.com/cheggaaa/pb"
version = "2.0.6"

[[constraint]]
branch = "master"
name = "github.com/dpb587/metalink"

[[constraint]]
branch = "master"
name = "github.com/dpb587/metalink-repository-resource"

[[constraint]]
name = "github.com/pkg/errors"
version = "0.8.0"

[prune]
go-tests = true
unused-packages = true
18 LICENSE
@@ -0,0 +1,18 @@
Copyright (c) 2018 Danny Berger <https://dpb587.me>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,72 @@
# dynamic-metalink-resource

A [Concourse](https://concourse.ci) resource for managing versions/files from arbitrary sources.


## Source Configuration

* **`version_check`** - a script to execute which will output an unordered list of all semvers (one per line)
* **`metalink_get`** - a script to generate [metalink](https://github.com/dpb587/metalink) content for the given `version` passed as an environment variable
* `signature_trust_store` - identities and keys used for signature verification
* `skip_hash_verification` - skip hash verification of files
* `skip_signature_verification` - skip signature verification of files
* `version` - a [supported](https://github.com/Masterminds/semver#basic-comparisons) version constraint (e.g. `^4.1`)
* `include_files` - a list of file globs to match when downloading a version's files (used by `in`)
* `exclude_files` - a list of file globs to skip when downloading a version's files (used by `in`)


## Operations


### `check`

Check for new versions.

Version:

* `version` - semantic version (e.g. `4.1.2`)


### `in`

Download and verify the referenced file(s).

* `.resource/metalink.meta4` - metalink data used when downloading the file
* `.resource/version` - version downloaded (e.g. `4.1.2`)
* `*` - the downloaded file(s) from the metalink

Parameters:

* `skip_download` - do not download blobs (only `metalink.meta4` and `version` will be available)

Metadata:

* `bytes` - total bytes of files
* `files` - number of files


### `out`

Unsupported.


## Usage

To use this resource type, you should configure it in the [`resource_types`](https://concourse-ci.org/resource-types.html) section of your pipeline.

- name: dynamic-metalink
type: docker-image
source:
repository: dpb587/dynamic-metalink-resource

The default `latest` tag will refer to the current, stable version of this Docker image. For using the latest development version, you can refer to the `master` tag. If you need to refer to an older version of this image, you can refer to the appropriate `v{version}` tag.


## Examples

Some examples of using this resource for upstream dependencies (e.g. [`golang`](examples/golang.yml), [`nginx`](examples/nginx.yml), [`openssl`](examples/openssl.yml)) are available in [`examples`](examples).


## License

[MIT License](LICENSE)

0 comments on commit ed337b1

Please sign in to comment.
You can’t perform that action at this time.