Skip to content

Commit

Permalink
Merge pull request #388 from spring-financial-group/bug/release_names…
Browse files Browse the repository at this point in the history
…_not_working_with_multiple_releases

fix: added failing test data for issues weve been seeing with aliases
  • Loading branch information
jenkins-x-bot authored Jan 10, 2022
2 parents 73f8838 + 8f82e3b commit ee518b7
Show file tree
Hide file tree
Showing 32 changed files with 421 additions and 48 deletions.
2 changes: 2 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ approvers:
- rawlingsj
- jstrachan
- rajdavies
- tomhobson
reviewers:
- rawlingsj
- jstrachan
- rajdavies
- tomhobson
1 change: 1 addition & 0 deletions cmd/app/main-win.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package app
Expand Down
1 change: 1 addition & 0 deletions cmd/app/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//nolint
//go:build !windows
// +build !windows

package app
Expand Down
4 changes: 2 additions & 2 deletions hack/linter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if ! [ -x "$(command -v golangci-lint)" ]; then
echo "Installing GolangCI-Lint"
${DIR}/install_golint.sh -b $GOPATH/bin v1.42.1
echo "Looks like golangci-lint isn't installed, to run \'make lint\' please install it."
exit 127
fi

export GO111MODULE=on
Expand Down
1 change: 1 addition & 0 deletions pkg/promote/promote_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package promote_test
Expand Down
1 change: 1 addition & 0 deletions pkg/promote/promote_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build unit
// +build unit

package promote_test
Expand Down
2 changes: 1 addition & 1 deletion pkg/rules/factory/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestRuleFactory(t *testing.T) {

t.Logf("creating tests at %s", tmpDir)

sourceData := filepath.Join("test_data")
sourceData := "test_data"
fileSlice, err := ioutil.ReadDir(sourceData)
assert.NoError(t, err)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repositories:
- name: yourorg
url: https://yourorg.example.com/charts
releases:
- name: dbmigrator
labels:
job: dbmigrator
chart: ./dbmigrator
- chart: dev/myapp
version: 1.2.3
name: myapp
namespace: jx
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
namespace: jx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
filepath: ""
repositories:
- name: yourorg
url: https://yourorg.example.com/charts
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: ./dbmigrator
name: dbmigrator
labels:
job: dbmigrator
- chart: dev/myapp
version: 1.2.3
name: myapp
namespace: jx
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
namespace: jx
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
filepath: ""
repositories:
- name: yourorg
url: https://yourorg.example.com/charts
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: ./dbmigrator
name: dbmigrator
labels:
job: dbmigrator
- chart: dev/myapp
version: 1.2.3
name: myapp
namespace: jx
- chart: dev/myapp
version: 1.2.4
name: myapp-beta
namespace: jx
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# test for when running `jx promote --release myapp-beta`
release: myapp-beta
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repositories:
- name: yourorg
url: https://yourorg.example.com/charts
releases:
- name: dbmigrator
labels:
job: dbmigrator
chart: ./dbmigrator
- chart: dev/myapp
version: 1.2.3
name: myapp
namespace: jx
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
namespace: jx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
filepath: ""
repositories:
- name: yourorg
url: https://yourorg.example.com/charts
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: ./dbmigrator
name: dbmigrator
labels:
job: dbmigrator
- chart: dev/myapp
version: 1.2.3
name: myapp
namespace: jx
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
namespace: jx
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
filepath: ""
repositories:
- name: yourorg
url: https://yourorg.example.com/charts
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: ./dbmigrator
name: dbmigrator
labels:
job: dbmigrator
- chart: dev/myapp
version: 1.2.3
name: myapp
namespace: jx
- chart: dev/myapp
version: 1.2.4
name: myapp-beta
namespace: jx
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# test for when running `jx promote --release myapp-beta`
release: myapp-beta
16 changes: 16 additions & 0 deletions pkg/rules/factory/test_data/helmfile-double-release/helmfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repositories:
- name: yourorg
url: https://yourorg.example.com/charts
releases:
- name: dbmigrator
labels:
job: dbmigrator
chart: ./dbmigrator
- chart: dev/myapp
version: 1.2.3
name: myapp
namespace: jx
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
namespace: jx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
filepath: ""
repositories:
- name: yourorg
url: https://yourorg.example.com/charts
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: ./dbmigrator
name: dbmigrator
labels:
job: dbmigrator
- chart: dev/myapp
version: 1.2.3
name: myapp
namespace: jx
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
namespace: jx
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
filepath: ""
repositories:
- name: yourorg
url: https://yourorg.example.com/charts
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: ./dbmigrator
name: dbmigrator
labels:
job: dbmigrator
- chart: dev/myapp
version: 1.2.4
name: myapp
namespace: jx
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
namespace: jx
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
filepath: ""
helmfiles:
- path: helmfiles/nginx/helmfile.yaml
- path: helmfiles/jx/helmfile.yaml
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
filepath: ""
helmfiles:
- path: helmfiles/nginx/helmfile.yaml
- path: helmfiles/jx/helmfile.yaml
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
filepath: ""
namespace: jx
repositories:
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: dev/myapp
version: 1.2.3
name: myapp
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
templates: {}
missingFileHandler: ""
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
filepath: ""
namespace: jx
repositories:
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: dev/myapp
version: 1.2.3
name: myapp
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
filepath: ""
namespace: jx
repositories:
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: dev/myapp
version: 1.2.3
name: myapp
- chart: dev/myapp
version: 1.2.4
name: myapp-beta
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
filepath: ""
environments:
default:
values:
- ../../jx-values.yaml
- ../../versionStream/src/fake-secrets.yaml.gotmpl
namespace: nginx
repositories:
- name: stable
url: https://charts.helm.sh/stable
releases:
- chart: stable/nginx-ingress
version: 1.39.1
name: nginx-ingress
values:
- ../../versionStream/charts/stable/nginx-ingress/values.yaml.gotmpl
forceNamespace: ""
skipDeps: null
templates: {}
missingFileHandler: ""
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# test for when running `jx promote --release myapp-beta`
release: myapp-beta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
filepath: ""
helmfiles:
- path: helmfiles/nginx/helmfile.yaml
- path: helmfiles/jx/helmfile.yaml
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
filepath: ""
helmfiles:
- path: helmfiles/nginx/helmfile.yaml
- path: helmfiles/jx/helmfile.yaml
templates: {}
renderedvalues: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace: jx
repositories:
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: dev/myapp
version: 1.2.3
name: myapp
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
templates: {}
missingFileHandler: ""
renderedvalues: {}

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
filepath: ""
namespace: jx
repositories:
- name: dev
url: http://chartmuseum-jx.34.78.195.22.nip.io
releases:
- chart: dev/myapp
version: 1.2.3
name: myapp
- chart: dev/myapp
version: 1.2.3
name: myapp-beta
templates: {}
renderedvalues: {}
Loading

0 comments on commit ee518b7

Please sign in to comment.