-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13c1f3b
commit 485e2ca
Showing
7 changed files
with
147 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ functests-mock | |
nix-container/ | ||
vendor | ||
app/up/version.go | ||
.upmodules |
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
tests/modtests/0011/.upmodules/hello-dummy2@25456bbcd17db524d1148e42bdcc3bb36ce90042/up.yml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
notes: | ||
- add username/password auth support | ||
|
||
dvars: | ||
- name: enc_key | ||
value: my_enc_key | ||
flags: | ||
- secret | ||
|
||
- name: github_password | ||
value: '{{ "something_secret" | encryptAES .enc_key }}' | ||
flags: | ||
- v | ||
|
||
- name: GITHUB_USERNAME | ||
value: my_github_username | ||
flags: | ||
- envVar | ||
- v | ||
|
||
- name: GITHUB_PASSWORD_ENCRYPTED | ||
value: '{{.github_password}}' | ||
flags: | ||
- secure | ||
- envVar | ||
- v | ||
|
||
tasks: | ||
- | ||
name: Main | ||
desc: main entry | ||
task: | ||
|
||
- | ||
func: call | ||
desc: | | ||
note that the module dir is: hello-module, but in upconfig.yml you give the alias hello as module name | ||
do: hello.Say_world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
version: 1.0.0 | ||
Verbose: v | ||
MaxCallLayers: 8 | ||
RefDir: . | ||
TaskFile: up.yml | ||
ConfigDir: . | ||
ConfigFile: upconfig.yml | ||
ModuleLock: true | ||
Secure: | ||
Type: default_aes | ||
#the key value will be a var name used for the value | ||
Key: enc_key | ||
# keyref: /a/secure/location/key.file | ||
|
||
ModRepoUsernameRef: GIT_USERNAME | ||
ModRepoPasswordRef: GIT_PASSWORD | ||
|
||
Modules: | ||
#By default: UPcmd will try to detect: | ||
#the global setting of git username and password: ModRepoUsernameRef and ModRepoPasswordRef | ||
#if individual repo UsernameRef and PasswordRef exist, then use the individual credential | ||
|
||
- repo: https://github.com/upcmd/auth_test_module.git | ||
alias: hello | ||
#ref to an env var name | ||
#this example shows it obtains a pre set credential from current shell context | ||
UsernameRef: AUTH_TEST_MODULE_GIT_USERNAME | ||
PasswordRef: AUTH_TEST_MODULE_GIT_PASSWORD | ||
PullPolicy: always | ||
|
||
- repo: https://github.com/upcmd/auth_test_module.git | ||
alias: hi | ||
#ref to an env var name | ||
#this example shows it obtain the configured credential from up.yml in secure context | ||
UsernameRef: GITHUB_USERNAME | ||
PasswordRef: GITHUB_PASSWORD_ENCRYPTED | ||
PullPolicy: always | ||
|
||
#* a side note: if you use token, then please use whatever value(not empty) for username, set the the ref value in env var to be the token's value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters