renamed files to avoid camelCase; moved token to common secrets file

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones 2021-12-22 15:29:22 -07:00
parent 455ccc460f
commit 2b95bf1536
No known key found for this signature in database
GPG Key ID: CFB3A382EB166F4C
8 changed files with 29 additions and 28 deletions

21
tests/secrets_sops.yaml Normal file
View File

@ -0,0 +1,21 @@
TestPAT: ENC[AES256_GCM,data:KYPnJTTCaEbEiBwODMDmOmZGx/Vu/4mOZPfRSjhBc239fPfHzDH75w==,iv:j9UFKfdRMfYg/3xw4dCoWbs0Zoy3czqRznlQrRvf4Sc=,tag:Pvd4UMFDOj8rLOwZJjsYpA==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnUEhWbjV3M29oUUJyWk81
Wk1WQ1E0cmtuVlhNSGxkWUM3WmJXdUYvbzAwCjlFWW9IVmtmTjY1aU1LR2lxWFlT
am9RemNqSDRWK2FDYk1xeGNiTFlWMFUKLS0tIFVrSzBCMERQbnhYb09ReVpFK00v
TG5YUDlFVzlRRFBCdEhsNVlVK1dMRTgKx1TPZWWQiaU8iMni03/ekG+m4rFCcaa4
JI+ED2d+8411BgZtlss/ukQtwskidvYTvetyWw2jes6o1lhfDv5q2A==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2021-12-22T22:23:53Z"
mac: ENC[AES256_GCM,data:twjo6LyD0QFJoD1h5qh8SFy4XC5+2JHl6mUiUxOjLnSBwft1Ntnto3+2tzZBU6+o+v/Uo++vRoSrIkLARFt74x2xA7jZjc81e5yCkcS79bWSpZ8bA7e8/5hgkyYP5SlMAYsWKXPodmhgN7bwCa6vjZb4ZlFkJuBZrHtLeziVY1E=,iv:kgDj5lnLTgLPK38CcUVYdtE11d/gpFdHPP9hgoZQO9U=,tag:tP2E3t/jKoh2Fx6Z2X/+Tw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.1

View File

@ -94,16 +94,16 @@ setup() {
}
@test "task: #GitPull" {
cd "$TESTDIR"/tasks/gitPull/
"$DAGGER" --europa up ./exists.cue
"$DAGGER" --europa up ./gitdir.cue
"$DAGGER" --europa up ./privateRepo.cue
cd "$TESTDIR"
"$DAGGER" --europa up ./tasks/gitPull/exists.cue
"$DAGGER" --europa up ./tasks/gitPull/git_dir.cue
"$DAGGER" --europa up ./tasks/gitPull/private_repo.cue
run "$DAGGER" --europa up ./invalid.cue
run "$DAGGER" --europa up ./tasks/gitPull/invalid.cue
assert_failure
run "$DAGGER" --europa up ./badremote.cue
run "$DAGGER" --europa up ./tasks/gitPull/bad_remote.cue
assert_failure
run "$DAGGER" --europa up ./badref.cue
run "$DAGGER" --europa up ./tasks/gitPull/bad_ref.cue
assert_failure

View File

@ -1,20 +0,0 @@
{
"data": "ENC[AES256_GCM,data:bdiZfZl5DUcmEeQz5FYmY7LKMaFqu8tRuImNtM2kofw1JVeFeoyDRA==,iv:ovbCLds/NAzl9dfkLSrkV5qWsQG9uJJjlw8psXLgJ+w=,tag:QvmQeMmPv6+JtOC5/wSr0Q==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRc1VaM281bjRUand4V2hz\nMnNIbW8rbUt5Q05LS0RuYVJ2Q09JZU9lZWcwCk8yTVRWYlQvR1Rvb3d4Skx0K2I5\nRXB6MmxnTEtFaThRWU13L05hQWdGblUKLS0tIHpUTll5aFgwSXdzVnMvWG11MDZ4\nbXBNWVVraDI5TmZHMlFSc2VSWSsrTkEKT6gyiklm5eQ04Q2p81+FACg+aRlfgaK6\nqT3aI/pLBrQXIKp5oYpyvY+5WPvM5uQHm5wH7FKXxoxxiZOaIOwgIQ==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2021-12-20T21:36:38Z",
"mac": "ENC[AES256_GCM,data:dxvXu9DDdWOG8pMJlh85OBSe5LePSFy8E1PYw8fQMGQFBVl9dHifTQuZ6eQeGluXtbqetgwa1ZHek1E7UO/WjtWYBtU1tBmlVqmcJ0MIJ67ULFwMHUb5yQqCh7JgymmsHRynqOQ4S2azIbqjmwz6eOyxxqNyJDA6l1NHsrVSeEU=,iv:UC02CgdM30+KOO0KDPkSFKM1HR+t2tenu0j5gYqx1FY=,tag:QB89K6zbWHjk6DCgMz8Lwg==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.7.1"
}
}

View File

@ -5,7 +5,7 @@ import "alpha.dagger.io/europa/dagger/engine"
engine.#Plan & {
inputs: secrets: token: command: {
name: "sops"
args: ["exec-env", "./privateRepo.enc.yaml", "echo $data"]
args: ["exec-env", "./secrets_sops.yaml", "echo $TestPAT"]
}
actions: {