Skip to content

Commit

Permalink
Merge branch 'master' into dev-undef
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec authored Jun 15, 2021
2 parents 0b326be + fd6ac08 commit 401c7a5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Currently, the following organizations are **officially** using Argo Workflows:
1. [Gladly](https://gladly.com/)
1. [Glovo](https://www.glovoapp.com)
1. [Google](https://www.google.com/intl/en/about/our-company/)
1. [Graviti](https://www.graviti.cn)
1. [Graviti](https://www.graviti.com)
1. [Greenhouse](https://greenhouse.io)
1. [Habx](https://www.habx.com/)
1. [Helio](https://helio.exchange)
Expand Down
4 changes: 2 additions & 2 deletions hack/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Available via `curl`

```sh
# Download the binary
curl -sLO https://github.com/argoproj/argo/releases/download/${version}/argo-darwin-amd64.gz
curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${version}/argo-darwin-amd64.gz

# Unzip
gunzip argo-darwin-amd64.gz
Expand All @@ -37,7 +37,7 @@ Available via `curl`

```sh
# Download the binary
curl -sLO https://github.com/argoproj/argo/releases/download/${version}/argo-linux-amd64.gz
curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${version}/argo-linux-amd64.gz

# Unzip
gunzip argo-linux-amd64.gz
Expand Down
12 changes: 9 additions & 3 deletions util/expr/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ import (
"encoding/json"

"github.com/Masterminds/sprig"

exprpkg "github.com/argoproj/pkg/expr"
"github.com/doublerebel/bellows"
)

var sprigFuncMap = sprig.GenericFuncMap() // a singleton for better performance

func init() {
delete(sprigFuncMap, "env")
delete(sprigFuncMap, "expandenv")
}

func GetFuncMap(m map[string]interface{}) map[string]interface{} {
env := bellows.Expand(m)
for k, v := range exprpkg.GetExprEnvFunctionMap() {
env[k] = v
}
delete(env, "env")
delete(env, "expandenv")
env["toJson"] = toJson
env["sprig"] = sprig.GenericFuncMap()
env["sprig"] = sprigFuncMap
return env
}

Expand Down

0 comments on commit 401c7a5

Please sign in to comment.