Commit 02b17e00 authored by SWE CI's avatar SWE CI

Merge branch 'release/v0.2.1'

parents 905f703a 554fca77
Pipeline #30268 passed with stage
in 20 seconds
```
__________ _____________ ___ .___ __ .__
\______ \/ _____/ | \ __| _/_______ ___/ |_ ____ ____ | |
| ___/\_____ \| | / / __ |/ __ \ \/ /\ __\/ _ \ / _ \| |
__________ _____________ ___ .___ __ .__
\______ \/ _____/ | \ __| _/_______ ___/ |_ ____ ____ | |
| ___/\_____ \| | / / __ |/ __ \ \/ /\ __\/ _ \ / _ \| |
| | / \ | / / /_/ \ ___/\ / | | ( <_> | <_> ) |__
|____| /_______ /______/ \____ |\___ >\_/ |__| \____/ \____/|____/
\/ \/ \/
\/ \/ \/
```
### Installation
```
go get git.psu.edu/k8s/devtool
```
This will add devtool to your go bin. Make sure the go bin is on your `$PATH`.
### Help
```
......@@ -33,8 +41,8 @@ Use "devtool [command] --help" for more information about a command.
```
### Configuration
The devtool commands can be configured through CLI arguments, through ENV variables, or a global configuration file (~/.devtool.yaml)
```yaml
......@@ -45,4 +53,4 @@ build:
skipCompile: false
runTests: true
openServices: true
```
\ No newline at end of file
```
......@@ -94,6 +94,14 @@ func init() {
if err != nil {
panic("invalid arg")
}
buildCmd.Flags().StringP("user", "u", "", "Specify user in MOCK_WEBACCESS_USER environment")
viper.SetDefault("build.webaccess.user", os.Getenv("USER"))
err = viper.BindPFlag("build.webaccess.user", buildCmd.Flags().Lookup("user"))
if err != nil {
panic("invalid arg")
}
}
func build(config config.Config) error {
......@@ -162,6 +170,11 @@ func buildDockerAndDeploy(config config.Config) error {
args = append(args, "--set", "secrets."+key+"="+os.Getenv(key))
}
}
mockWebAccessUser := viper.GetString("build.webaccess.user")
if mockWebAccessUser != "" {
args = append(args, "--set", "environmentVariables.MOCK_WEBACCESS_USER"+"="+mockWebAccessUser)
}
args = append(args, "--set", "image.repository="+image)
args = append(args, "--set", "image.tag="+tag.String())
args = append(args, "-f", deployable.LocalConfig)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment