diff --git a/README.md b/README.md index c35f09d..aa7d417 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,13 @@ This allows the user to more easily generate type-safe Concourse CI pipelines, t * S3 - [`concourse/s3-resource`](https://github.com/concourse/s3-resource) * S3 Bucket - [`18F/s3-resource-simple`](https://github.com/18F/s3-resource-simple) * Slack Notification - [`cloudfoundry-community/slack-notification-resource`](https://github.com/cloudfoundry-community/slack-notification-resource) +* Time - [`concourse/time-resource`](https://github.com/concourse/time-resource) ## Install For stability, users are encouraged to import from a tagged release, not from the master branch, and to watch for new releases. This project does not yet have rigorous testing set up for it and new commits on the master branch are prone to break compatibility and are almost sure to change the import hash for the expression, thus the releases are currently `v0.x`. To import everything, use: ``` -https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.5.2/package.dhall sha256:0941f560f213ef8fb89ca3258fcc1a013bfa08f6bf2ff320e592e7f116bc81c5 +https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.6.0/package.dhall sha256:22b1cdb4a35dcac29a2da536f5c51a4b31d4c4dd71268756b054738afaae1da2 ``` ## Intended Usage @@ -49,16 +50,16 @@ This introduces a question - what should the type of the `source` field be? Main This repository allows the user to construct the type of `Resource` and of `ResourceType` based on a union that the downstream user constructs, consisting only of the resource types which the downstream user actually uses in their pipeline. This solves both the code-reusage problem, and keeps the implementation performant. For example: ```dhall -let Git = https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.5.2/resource-types/Git.dhall sha256:830b9d7d0e9e0992ee2473f78e05838a86be3e13c7bcf5df661b8829dbc3d558 +let Git = https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.6.0/resource-types/Git.dhall sha256:830b9d7d0e9e0992ee2473f78e05838a86be3e13c7bcf5df661b8829dbc3d558 -let S3 = https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.5.2/resource-types/S3.dhall sha256:6e062defd2cf94a3f7840d1b09c7a832d0a92467f5924a2b812843c053a8eca5 +let S3 = https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.6.0/resource-types/S3.dhall sha256:6e062defd2cf94a3f7840d1b09c7a832d0a92467f5924a2b812843c053a8eca5 let Source = < Git : Git.Source.Type | S3 : S3.Source.Type > let Version = < Git : Git.Version.Type | S3 : S3.Version.Type > let Resource = - let import = https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.5.2/Resource.dhall sha256:206f784b14f3fb78809bafffbde955fbc177ca0427c8fe9cf4a983a8aaf463c1 + let import = https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.6.0/Resource.dhall sha256:206f784b14f3fb78809bafffbde955fbc177ca0427c8fe9cf4a983a8aaf463c1 in import { Source, Version } diff --git a/package.dhall b/package.dhall index b1add32..d8f98b6 100644 --- a/package.dhall +++ b/package.dhall @@ -1,5 +1,5 @@ { resource-types = - ./resource-types/package.dhall sha256:e602ce427a7394ae5054c35c4dfbe374ecad1730d63ebc64391b6cf47d2ebcc8 + ./resource-types/package.dhall sha256:c31d891e5257473043c1cd40297c0c7eabcfc2e540345329bd8809b739a38d13 ? ./resource-types/package.dhall , Resource = ./Resource.dhall sha256:206f784b14f3fb78809bafffbde955fbc177ca0427c8fe9cf4a983a8aaf463c1 diff --git a/resource-types/Time.dhall b/resource-types/Time.dhall new file mode 100644 index 0000000..1ac1373 --- /dev/null +++ b/resource-types/Time.dhall @@ -0,0 +1,26 @@ +{ meta = { name = "time", repository = "concourse/time-resource" } +, Version = { Type = { time : Text }, default = {=} } +, Params = + { Get = { Type = {}, default = {=} }, Put = { Type = {}, default = {=} } } +, Source = + let Source = + { Type = + { interval : Optional Text + , location : Optional Text + , start : Optional Text + , stop : Optional Text + , days : Optional (List Text) + } + , default = + { interval = None Text + , location = None Text + , start = None Text + , stop = None Text + , days = None (List Text) + } + } + + let test = Source::{=} + + in Source +} diff --git a/resource-types/package.dhall b/resource-types/package.dhall index 9f5e267..b14e33b 100644 --- a/resource-types/package.dhall +++ b/resource-types/package.dhall @@ -31,4 +31,7 @@ , SlackNotification = ./SlackNotification.dhall sha256:637b51d4ea5273e22d60c4c3dcee9ebc87e4316254abcf1c4ba27fe7d9cc720f ? ./SlackNotification.dhall +, Time = + ./Time.dhall sha256:31a94594fb11d939559befed5307954463d9832fc0c9e085455ebb08689932e2 + ? ./Time.dhall }