Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#119): add new home for configuration files #144

Merged
merged 34 commits into from
May 24, 2018
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cb5a4da
chore: ignore .dockerignore and .ike-prow directory
dipak-pawar May 17, 2018
7cb818a
chore: update path to take .ike-prow dir for configuration
dipak-pawar May 17, 2018
a2c1115
chore: update doc for plugin hint configuration
dipak-pawar May 17, 2018
96604b8
chore: move our test-keeper configuration in .ike-prow dir
dipak-pawar May 17, 2018
5e2f45c
Merge branch 'master' of https://github.com/arquillian/ike-prow-plugi…
dipak-pawar May 17, 2018
c32f52a
Merge branch 'master' into issue_119
MatousJobanek May 17, 2018
64e63f2
chore: removes test-keeper.yaml from root dir
dipak-pawar May 18, 2018
3acc1b8
chore: removes unnecessary regex test-keeper.yaml from config
dipak-pawar May 18, 2018
6ec0087
fix: modify test to new use new config location
dipak-pawar May 18, 2018
e4eb40c
Merge branch 'master' of https://github.com/arquillian/ike-prow-plugi…
dipak-pawar May 18, 2018
1d3531f
chore: update test-fixture with new location for config file
dipak-pawar May 18, 2018
fb4f0d4
feat: load hint file from .ike-prow/ by default
dipak-pawar May 18, 2018
9b05d43
resolved conflicts
dipak-pawar May 21, 2018
4f6d727
fix: update test to use single function
dipak-pawar May 21, 2018
5ccc521
chore: update glide.lock
dipak-pawar May 21, 2018
3b3efa4
Merge branch 'master' into issue_119
dipak-pawar May 22, 2018
1821514
Merge branch 'master' of https://github.com/arquillian/ike-prow-plugi…
dipak-pawar May 23, 2018
1f3d490
fix: add const for .ike-prow/ and removes config file eager loading
dipak-pawar May 23, 2018
bf096fd
fix: remove unnecasary code from test
dipak-pawar May 23, 2018
fd03a90
fix: add comment for exported constant
dipak-pawar May 23, 2018
61fff53
chore: remove unnecessary mocking in test and use const variable
dipak-pawar May 23, 2018
12a8d5e
chore: use format function for all part
dipak-pawar May 24, 2018
f6e7fea
chore: extract configFilePath variable in test
dipak-pawar May 24, 2018
cca4a27
fix: add missing scenario - no config file, but hint file
dipak-pawar May 24, 2018
5e5bd42
doc: add doc for default loading behaviour of config hint file
dipak-pawar May 24, 2018
d584a4b
Merge branch 'master' of https://github.com/arquillian/ike-prow-plugi…
dipak-pawar May 24, 2018
1530326
fix: fix failing tests after merge
dipak-pawar May 24, 2018
9fd8d2e
fix: modified CreateCommentMessage to not use nested else
dipak-pawar May 24, 2018
317e2f8
modifies documentation
MatousJobanek May 24, 2018
264f938
brings back the string in defaultFileContent method to keep the
MatousJobanek May 24, 2018
6b6d360
removes location url in test case where it should be missing
MatousJobanek May 24, 2018
856bd0a
changes documentation so the content in plugins chapters reflects the
MatousJobanek May 24, 2018
78a84b4
Merge branch 'master' into issue_119
MatousJobanek May 24, 2018
4611126
removed unnecessary conversion
MatousJobanek May 24, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ike-prow/test-keeper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
skip_validation_for:
- 'cluster/'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is still also the original file https://github.com/dipak-pawar/ike-prow-plugins/blob/c32f52a822cedb073f21298dda3e98ecb424bf82/test-keeper.yaml - it should be removed (moved here)

2 changes: 1 addition & 1 deletion docs/plugins.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To enable customized plugin hint comment messages edit plugin's configuration fi
.test-keeper.yaml
[source, yml, indent=0]
----
plugin_hint: plugins/test-keeper_hint.md
plugin_hint: .ike-prow/test-keeper_hint.md
----

The `plugin_hint` property can either have an inline string directly written inside of the config file or another file with case insensitive filename PLUGINNAME_HINT.md that contains the hint. The location of the file can be set by either a relative path or an absolute URL. If nothing is set then a default message is used.
Expand Down
2 changes: 2 additions & 0 deletions pkg/assets/config/test-keeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ skip_validation_for:
## Docker
- 'regex{{docker-compose.*\.y[a]?ml$}}'
- 'Dockerfile*'
- '.dockerignore'

## Others
- 'Makefile'
Expand Down Expand Up @@ -134,3 +135,4 @@ skip_validation_for:

# Our own configurations
- 'regex{{test-keeper\.y[a]?ml$}}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this line still necessary when the configs should be inside of the directory that is excluded?

- '.ike-prow/'
6 changes: 3 additions & 3 deletions pkg/github/service/config_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ type LoadableConfig struct {
BaseConfig *config.PluginConfiguration
}

// Sources provides default loading strategies for a plugin looking it up in the root of the repository for a given
// Sources provides default loading strategies for a plugin looking it up in the .ike-prow directory of the repository for a given
// revision. Two files are expected to be found there plugin-name.yml or plugin-name.yaml (in that order)
func (l *LoadableConfig) Sources() []config.Source {
return []config.Source{
l.loadFromRawFile("%s.yml"),
l.loadFromRawFile("%s.yaml"),
l.loadFromRawFile(".ike-prow/%s.yml"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make .ike-prow/ a constant as it is used at several places

l.loadFromRawFile(".ike-prow/%s.yaml"),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ test_patterns:
skip_validation_for:
- 'regex{{.*\.[xsd]?html$}}' # <!--2-->
combine_defaults: false # <!--3-->
plugin_hint: plugins/test-keeper_hint.md # <!--4-->
plugin_hint: .ike-prow/test-keeper_hint.md # <!--4-->