File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+
2+ # generated by: jx gitops variables
3+ export APP_NAME=' mygroup-myrepo'
4+ export BRANCH_NAME=' PR-23'
5+ export BUILD_NUMBER=' 5'
6+ export DOCKERFILE_PATH=' Dockerfile'
7+ export DOCKER_REGISTRY=' my-registry.com'
8+ export DOCKER_REGISTRY_ORG=' myowner'
9+ export DOMAIN=' mydomain.com'
10+ export GIT_BRANCH=' mybranch'
11+ export JENKINS_X_URL=' https://dashboard-mydomain.com/MyOwner/mygroup/myrepo/PR-23/5'
12+ export JX_CHART_REPOSITORY=' http://bucketrepo/bucketrepo/charts/'
13+ export KANIKO_FLAGS=' cheese'
14+ export MINK_AS=' tekton-bot'
15+ export MINK_IMAGE=' my-registry.com/myowner/mygroup/myrepo:1.2.3'
16+ export PIPELINE_KIND=' pullrequest'
17+ export PUSH_CONTAINER_REGISTRY=' localhost:5000'
18+ export REPO_NAME=' mygroup/myrepo'
19+ export REPO_OWNER=' MyOwner'
20+ export VERSION=' 1.2.3'
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ func (o *Options) Validate() error {
197197 {
198198 Name : "APP_NAME" ,
199199 Function : func () (string , error ) {
200- return o .Options .Repository , nil
200+ return naming . ToValidName ( o .Options .Repository ) , nil
201201 },
202202 },
203203 {
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ func TestCmdVariables(t *testing.T) {
8888 o .GitBranch = "mybranch"
8989 o .DashboardURL = "https://dashboard-mydomain.com"
9090
91- if name == "empty" {
91+ if name == "empty" || name == "nested" {
9292 o .Requirements = & requirements .Spec
9393 }
9494
@@ -107,6 +107,9 @@ func TestCmdVariables(t *testing.T) {
107107 )
108108 o .Options .Owner = "MyOwner"
109109 o .Options .Repository = "myrepo"
110+ if name == "nested" {
111+ o .Options .Repository = "mygroup/myrepo"
112+ }
110113 o .Options .Branch = "PR-23"
111114 o .Options .SourceURL = "https://github.com/" + o .Options .Owner + "/" + o .Options .Repository
112115 o .Options .ScmClient = scmFake
You can’t perform that action at this time.
0 commit comments