Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
s3 resource - chagne skip_download to string (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShauliSolomovich authored Jul 22, 2020
1 parent 7b0d512 commit 1f01fe4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This allows the user to more easily generate type-safe Concourse CI pipelines, t
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.7.0/package.dhall sha256:d2f16eefdd12b916b517b538e789bc87ec2d7ebf7c78fb6292802038a53c0cd6
https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.7.1/package.dhall sha256:d71d5c614768ab1abd898f328b26b137aa9118b22780ccb4dcf6a8e4f8a528d9
```

## Intended Usage
Expand All @@ -51,16 +51,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.7.0/resource-types/Git.dhall sha256:830b9d7d0e9e0992ee2473f78e05838a86be3e13c7bcf5df661b8829dbc3d558
let Git = https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.7.1/resource-types/Git.dhall sha256:830b9d7d0e9e0992ee2473f78e05838a86be3e13c7bcf5df661b8829dbc3d558

let S3 = https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.7.0/resource-types/S3.dhall sha256:d9129408caf467ffa23f16470313cb58d4725687d26e043ee015c75b87f3c679
let S3 = https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.7.1/resource-types/S3.dhall sha256:b49ec06747630f6d6951fde4f04f7bbffab7cee1a9ef299464314ad049422d04

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.7.0/Resource.dhall sha256:206f784b14f3fb78809bafffbde955fbc177ca0427c8fe9cf4a983a8aaf463c1
let import = https://raw.githubusercontent.com/coralogix/dhall-concourse/v0.7.1/Resource.dhall sha256:206f784b14f3fb78809bafffbde955fbc177ca0427c8fe9cf4a983a8aaf463c1

in import { Source, Version }

Expand Down
2 changes: 1 addition & 1 deletion package.dhall
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ resource-types =
./resource-types/package.dhall sha256:97e8de50c3a47720f82c5a401aee7fc0cdf124a1240d63ab69ce08372922c56c
./resource-types/package.dhall sha256:94ec73f7b06436fa1c38b53905e059fab56546fdd51679eef802a62a5446991e
? ./resource-types/package.dhall
, Resource =
./Resource.dhall sha256:206f784b14f3fb78809bafffbde955fbc177ca0427c8fe9cf4a983a8aaf463c1
Expand Down
14 changes: 12 additions & 2 deletions resource-types/S3.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,22 @@
{ Get =
let Get =
{ Type =
{ skip_download : Optional Bool
{ skip_download :
let type =
{- the resource expects either "true" or "false"
-- as a string, keeping it as a boolean value results
-- in a Go parsing error when the resource tries to
-- parse the bool. The two valid values are "true"
-- or "false".
-}
Optional Text

in type
, unpack : Optional Bool
, download_tags : Optional Bool
}
, default =
{ skip_download = None Bool
{ skip_download = None Text
, unpack = None Bool
, download_tags = None Bool
}
Expand Down
2 changes: 1 addition & 1 deletion resource-types/package.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
./RegistryImage.dhall sha256:2ca4df79f82f54275f919d759344a6478749f7d0f32bddbc0389877ede11da03
? ./RegistryImage.dhall
, S3 =
./S3.dhall sha256:d9129408caf467ffa23f16470313cb58d4725687d26e043ee015c75b87f3c679
./S3.dhall sha256:b49ec06747630f6d6951fde4f04f7bbffab7cee1a9ef299464314ad049422d04
? ./S3.dhall
, S3Bucket =
./S3Bucket.dhall sha256:fc95953a8603a450c4e34b7394714332ede9759436256f153d00a829fddccc31
Expand Down

0 comments on commit 1f01fe4

Please sign in to comment.