diff --git a/stdlib/.dagger/env/op-fetch-git/.gitignore b/stdlib/.dagger/env/op-fetch-git/.gitignore new file mode 100644 index 00000000..01ec19b0 --- /dev/null +++ b/stdlib/.dagger/env/op-fetch-git/.gitignore @@ -0,0 +1,2 @@ +# dagger state +state/** diff --git a/stdlib/.dagger/env/op-fetch-git/values.yaml b/stdlib/.dagger/env/op-fetch-git/values.yaml new file mode 100644 index 00000000..6f52cd47 --- /dev/null +++ b/stdlib/.dagger/env/op-fetch-git/values.yaml @@ -0,0 +1,26 @@ +plan: + package: ./dagger/op/tests/fetch-git +name: op-fetch-git +inputs: + TestPAT: + secret: ENC[AES256_GCM,data:4rBqMc8jbs0mIl2tqxZZu6xhKWq1zb4Zmdd4eobZxmT5xkeVJM94KA==,iv:xj6wu5amzCACh8vvBbtqYK8MLsFvoFIYe2wsDLhbzhc=,tag:ZCInVlyCr41MfV9W9SK5iw==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBjYUh0WC8yTEtaK2VlZEU4 + c1pCTUNFWWt3WE5GSzZPU1VuWnVQWHMyWTF3CnVRN0ovd2tWUlU0Q1BneEEyQm9s + Rm9TNGVVK3g5aVJUOGNYRzdxbERnNUUKLS0tIDRvTlU2eUozZy9jYzFqOHB6SzNE + NnhoNTZYQVJBV1FKUHI1aWJZTnc0bEkKBNxuA26mtiAznfuGbLcqeIxvgg9kLjBl + ZofKLWu33k7aUQJADAEKoFD7B0B502LtQRMLk94ObzdhdLxl1F3JNA== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2021-08-25T15:03:39Z" + mac: ENC[AES256_GCM,data:IwMHAYejWYenT9KCSSBQhQcRMS+6EJBwDlmP1iWBNs41sbFMSvLabRsh1QHfgN8IYMc02XSii3PM8nDW44CG3s2PYaejEbS0/Q4OnqDFWjW3oyaDxS5/4OvJALV5JWSyQYAItepI1B/M6vL8nXS8lUxxuythX5jyEq9LTGfB608=,iv:8ecze6Fz8BSnENS6cXTpZ6s5zAQMsnb3yqvCjDvwhMc=,tag:iHi/g9K8GX9hrJGN2oq7Jg==,type:str] + pgp: [] + encrypted_suffix: secret + version: 3.7.1 diff --git a/stdlib/dagger/op/tests/fetch-git/fetch-git.cue b/stdlib/dagger/op/tests/fetch-git/fetch-git.cue new file mode 100644 index 00000000..3b20bba0 --- /dev/null +++ b/stdlib/dagger/op/tests/fetch-git/fetch-git.cue @@ -0,0 +1,22 @@ +package op + +import ( + "alpha.dagger.io/os" + "alpha.dagger.io/dagger" + "alpha.dagger.io/dagger/op" +) + +// Github PAT +TestPAT: dagger.#Input & {dagger.#Secret} + +TestRepo: #up: [op.#FetchGit & { + remote: "https://github.com/dagger/dagger.git" + ref: "main" + authTokenSecret: TestPAT +}] + +TestContent: os.#Container & { + always: true + command: "ls -l /input/repo | grep 'universe -> stdlib'" + mount: "/input/repo": from: TestRepo +} diff --git a/stdlib/universe.bats b/stdlib/universe.bats index ddc2379b..153e64ba 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -8,6 +8,10 @@ setup() { dagger -e sanity-check up } +@test "op-fetch-git" { + # This test should be in `tests/ops.bats` but dagger compute doesn't handle `dagger.#Secret` + dagger -e op-fetch-git up +} @test "os" { dagger -e os up