From 67a982eb0f508c10c4f64ff7a4df8a6a5754e21c Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Sat, 26 Jun 2021 17:06:30 +0200 Subject: [PATCH] Move push and pull tests plans to docker subpackages Signed-off-by: Tom Chauveau --- stdlib/.dagger/env/docker-pull/values.yaml | 7 ++++--- .../env/docker-push-invalid-creds/values.yaml | 21 +++++++++++-------- stdlib/.dagger/env/docker-push/values.yaml | 7 ++++--- .../plan => docker/tests/pull}/pull.cue | 7 +++---- .../tests/push-invalid-creds}/push.cue | 9 ++++---- .../plan => docker/tests/push}/push.cue | 15 +++++++------ 6 files changed, 34 insertions(+), 32 deletions(-) rename stdlib/{.dagger/env/docker-pull/plan => docker/tests/pull}/pull.cue (73%) rename stdlib/{.dagger/env/docker-push-invalid-creds/plan => docker/tests/push-invalid-creds}/push.cue (78%) rename stdlib/{.dagger/env/docker-push/plan => docker/tests/push}/push.cue (77%) diff --git a/stdlib/.dagger/env/docker-pull/values.yaml b/stdlib/.dagger/env/docker-pull/values.yaml index 86e2fe33..fab47bc2 100644 --- a/stdlib/.dagger/env/docker-pull/values.yaml +++ b/stdlib/.dagger/env/docker-pull/values.yaml @@ -1,5 +1,6 @@ plan: - module: .dagger/env/docker-pull/plan + module: ./docker + package: ./tests/pull name: docker-pull inputs: ref: @@ -19,8 +20,8 @@ sops: SG1raUVNTzZIWDltV1pOS3hySHlJeWcKg3blmstOGcxtPww513+mAEA0MWOXwNAT 5ngRvG6MraW3g9dhIuUYOwjuJyz1Z07/DBEocSxnjSyw45ZCkM1/9Q== -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-24T09:36:46Z" - mac: ENC[AES256_GCM,data:ncBmzJ8Tl1HkI5KUHTQowZVbrczoub1JBWLzK0FD6A2wh5vLVa/KHzcW1N6kXlzNMN7GDSAD8LAiPsW5uQoMDz4uFkrAMtdfXNsZ5jP7dZJawAh1J4PjDhc5vnKLJq7Ps/u1dsECiZWt1tk+R3KH7xGahZXXKCHfib8k3OEkiqQ=,iv:zjeA3oZ9JBE+bOO66R2xmJup7a9bBvDYUhrQg1H9kE0=,tag:Wjdsw5rbPfgQdMXaDAwAAQ==,type:str] + lastmodified: "2021-06-26T14:52:40Z" + mac: ENC[AES256_GCM,data:IVEK6NFWEmNv8kRay2wVNhrsXVazVinIYRDLy7DTvaiWXyQYun//joK3QIoKz3dqi9rXeuTd95B13RxVQWKy/8cpmryg4QCwAaCj8erb5FHMRfn5/mAAV3NL5oAoOpKF4lZByrfdrXTJKppGWwYOFy8X693kK3FUzoUpIW2OqXg=,iv:qinwsUefQ7M+0OCTISPdQ9q//xsPitmHeCpdF00BJoo=,tag:reHZ5j0nz9fjAEFpR7IGGQ==,type:str] pgp: [] encrypted_suffix: secret version: 3.7.1 diff --git a/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml b/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml index 9f227119..423b44a7 100644 --- a/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml +++ b/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml @@ -1,9 +1,12 @@ +plan: + module: ./docker + package: ./tests/push-invalid-creds name: docker-push-invalid-creds inputs: TestRegistry.secret: - text: ENC[AES256_GCM,data:QOkT,iv:MUV92Llmt8pskd1AUjnvpQ+B3Ws1wLKIuzy7SVhHRME=,tag:StNvPnmz89GcLb1Cro3O9g==,type:str] + text: ENC[AES256_GCM,data:PckymCtA/Q==,iv:to7XhUUcZrWDga7uT4C067BRzHEzmTPDUNAEb2TpS/I=,tag:jUTk8uGd185hmIvi/IHpww==,type:str] TestRegistry.username: - text: john + text: invalid sops: kms: [] gcp_kms: [] @@ -13,14 +16,14 @@ sops: - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk enc: | -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB3MC9DZGU1Tm5Ta2ttNUph - ZGxZaGxLMklRRWVaVmtzdEdqbnlkYmIvK2hNClVKd2RCak1GYXlvZWQxaHlzQUNw - Y2czeEdXZnQxT2dVQ01GY0NTcGNkMnMKLS0tIGwwa0xXVEZQUVUzdUpOQUJFTUxy - ZzZNNk1xb0F4cWVQRjh4aUJSUzExd2cKl0Ka0Qcc2KNOQjl3Bhnb1sGuJCZ6iDs4 - Hz2EldaxWJHZxuS18uNC38NxufG02ULJqJb2QC4cOzPrTeeKVE6Qlg== + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4czBwNGtSdGZqdEZ5WDlM + SHVYOU5zdFl4L2ptZk5rSHgwek1aaDNicENFCkJ4OUIweU5OZTVKalpTSkhYaGxB + RUpHZmVvU3g3Y2tBZnRUcHh0TE52M1EKLS0tIHI1VUt1aUR0a0tDNHJVTHY4eEt1 + VC8wSTZvUE5UaDg2WE1CaGMzR3M1TEkK9v83AVI4lvFgjKCg8UmQrcxarlESWTfV + 2cDdWgoH7ZqgXo5jFv2tn8qQWHKl8eTTeYUWn8GoNVPKrCroax2fiQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-12T15:03:49Z" - mac: ENC[AES256_GCM,data:o2fTjTnDgSX4f2jSjs1LSKJ7eTrTmFV44gyZdYCdYnb6eyXpFuT4Bru8ERuJlTvUSc3wx4js14BlxS3T0tX0aBV39ScBlzQOC4Ulyvh4KOKEH9uUl7YmGrFlNH4yQ7DYoezxCqwxlLZGavDaSXUszvKWlcdMsTm3L/4LkfHQzWk=,iv:E1gyYQ0+02bIQguvN0w+wp8RS6uyT17tXp18e5riXmg=,tag:Azjz4ZivYmjC/7eMc6SfSQ==,type:str] + lastmodified: "2021-06-26T15:00:53Z" + mac: ENC[AES256_GCM,data:ptE3WydZDuethnN5Qh26uAfndRbT+RKz2mktH4s2KyRNeDKgiBfwOVS1xoTxz+nkFoms0Cxac3iaVwZLpZXniQUbOAYY1fzfmyL32bfAUdNFs7P6K0thwSy8r8LJ38GvxHzZW289YVFTGSaJWCapbrcGzl6B7Aj5RcQ+Hhu32K8=,iv:PA2R7Q8y8F//RGnHpOCmxp8jWKXlAZ3Yfo0xbtPfx2E=,tag:EmxBTb9WVrDdOmgDHEDYfg==,type:str] pgp: [] encrypted_suffix: secret version: 3.7.1 diff --git a/stdlib/.dagger/env/docker-push/values.yaml b/stdlib/.dagger/env/docker-push/values.yaml index 57fea252..46297620 100644 --- a/stdlib/.dagger/env/docker-push/values.yaml +++ b/stdlib/.dagger/env/docker-push/values.yaml @@ -1,5 +1,6 @@ plan: - module: .dagger/env/docker-push/plan + module: ./docker + package: ./tests/push name: docker-push inputs: TestRegistry.secret: @@ -21,8 +22,8 @@ sops: UjFJYTc1UUUzSFVkZjQ2blRsSGpVdVEKOanMR3+WlAgoDfqTUW7WPW1ytT3NdkTX 4Rqo49QmnuKFJ9tKoBFQOqgIo8E/lpcOkeIUiy5e/35FvsZ/KFk/pg== -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-18T19:34:53Z" - mac: ENC[AES256_GCM,data:2LqpZGLCgN4d72hZMSs9uuIy0Eh69eP9JfhCcCvnIUg8kXcr5/mThST3Xum1LHJsAwfXIxPQPuz2ZzlcWksgYczNalU+ibTVk6N3nLi4ynrbV5QXaoS2MUmJHx6Y4VsjKHg13DQOysqcCa3+vY3WKxZ/WLgkI0rVOwZMELQBfXo=,iv:LeVFP37Y0rpLJa3IpbHD0N1ZARH139dz434c+uLv+Yo=,tag:yjlfzzcvvFzmVnvBX+8aAg==,type:str] + lastmodified: "2021-06-26T14:53:13Z" + mac: ENC[AES256_GCM,data:kxzdmyQwRIVP9D+w9LzRDIZOxDUqpSaGeD/GqaVxnQivEUjVFK5ePAcYV1fzjU4eeO3chIrP8NpvpIKZ1LztQddsPdTj72Yffgc5yq8/dGa3njiM8p9oa5hnZNoxLtyVPgRoNy3ZUZ6YSN9nqCFWW0DCjeSoiDlPX+1Vj/S6PeM=,iv:DhX4N6idS3VBaqau6k9yH+li34hOd3jqBsJJQu/P3Jw=,tag:X+taa7XgRmovR0JkhGpi7g==,type:str] pgp: [] encrypted_suffix: secret version: 3.7.1 diff --git a/stdlib/.dagger/env/docker-pull/plan/pull.cue b/stdlib/docker/tests/pull/pull.cue similarity index 73% rename from stdlib/.dagger/env/docker-pull/plan/pull.cue rename to stdlib/docker/tests/pull/pull.cue index e0bb462e..0f4b0e81 100644 --- a/stdlib/.dagger/env/docker-pull/plan/pull.cue +++ b/stdlib/docker/tests/pull/pull.cue @@ -1,15 +1,14 @@ package docker import ( - "dagger.io/docker" - "dagger.io/dagger/op" - "dagger.io/alpine" + "alpha.dagger.io/dagger/op" + "alpha.dagger.io/alpine" ) ref: string @dagger(input) TestPull: { - pull: docker.#Pull & {from: ref} + pull: #Pull & {from: ref} check: #up: [ op.#Load & {from: alpine.#Image}, diff --git a/stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue b/stdlib/docker/tests/push-invalid-creds/push.cue similarity index 78% rename from stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue rename to stdlib/docker/tests/push-invalid-creds/push.cue index 83e283a7..e995aab0 100644 --- a/stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue +++ b/stdlib/docker/tests/push-invalid-creds/push.cue @@ -1,8 +1,7 @@ package docker import ( - "dagger.io/docker" - "dagger.io/random" + "alpha.dagger.io/random" ) TestRegistry: { @@ -15,7 +14,7 @@ TestPush: { name: "daggerio/ci-test:\(tag.out)" - image: docker.#ImageFromDockerfile & { + image: #ImageFromDockerfile & { dockerfile: """ FROM alpine RUN echo "test" > /test.txt @@ -23,10 +22,10 @@ TestPush: { context: "" } - push: docker.#Push & { + push: #Push & { "name": name source: image - registry: { + auth: { username: TestRegistry.username secret: TestRegistry.secret } diff --git a/stdlib/.dagger/env/docker-push/plan/push.cue b/stdlib/docker/tests/push/push.cue similarity index 77% rename from stdlib/.dagger/env/docker-push/plan/push.cue rename to stdlib/docker/tests/push/push.cue index 529466ca..4f2315b4 100644 --- a/stdlib/.dagger/env/docker-push/plan/push.cue +++ b/stdlib/docker/tests/push/push.cue @@ -1,11 +1,10 @@ package docker import ( - "dagger.io/dagger/op" - "dagger.io/dagger" - "dagger.io/docker" - "dagger.io/alpine" - "dagger.io/random" + "alpha.dagger.io/dagger/op" + "alpha.dagger.io/dagger" + "alpha.dagger.io/alpine" + "alpha.dagger.io/random" ) TestRegistry: { @@ -36,7 +35,7 @@ TestRegistry: { } TestPush: { - tag: random.#String & {seed: "docker push and pull"} + tag: random.#String & {seed: "docker push"} name: "daggerio/ci-test:\(tag.out)" @@ -44,7 +43,7 @@ TestPush: { secret: TestRegistry.secret } - image: docker.#ImageFromDockerfile & { + image: #ImageFromDockerfile & { dockerfile: """ FROM alpine RUN echo "test" > /test.txt @@ -52,7 +51,7 @@ TestPush: { context: "" } - push: docker.#Push & { + push: #Push & { "name": name source: image auth: {