Move push and pull tests plans to docker subpackages

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau 2021-06-26 17:06:30 +02:00
parent 5468f60e39
commit 67a982eb0f
6 changed files with 34 additions and 32 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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},

View File

@ -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
}

View File

@ -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: {