Change pipeline config path resolution (#299)

# Config resolution
- pipeline-config setting empty / not specified (default): `.woodpecker/` => `.woodpecker.yml` => `.drone.yml`
- pipeline-config setting defined by user: try that file / folder and no fallback (if a user sets some special value that is normally done for some reason)

# Changes
- pipeline-config setting will be empty by default
- remove fallback setting for config loading (simplifies config)

---
closes #133

---

* adjust config fetching mechanism

* default path empty

* remove fallback flag from ui and db
This commit is contained in:
Anbraten
2021-09-17 21:40:43 +02:00
committed by GitHub
parent d4ab506507
commit 289f0c9ad6
23 changed files with 331 additions and 183 deletions

View File

@@ -41,7 +41,6 @@ export default class Settings extends Component {
this.handleVisibilityChange = this.handleVisibilityChange.bind(this);
this.handleTimeoutChange = this.handleTimeoutChange.bind(this);
this.handlePathChange = this.handlePathChange.bind(this);
this.handleFallbackChange = this.handleFallbackChange.bind(this);
this.handleChange = this.handleChange.bind(this);
}
@@ -74,14 +73,6 @@ export default class Settings extends Component {
value={repo.config_file}
onBlur={this.handlePathChange}
/>
<label>
<input
type="checkbox"
checked={repo.fallback}
onChange={this.handleFallbackChange}
/>
<span>Fallback to .drone.yml if path not exists</span>
</label>
</div>
</section>
<section>
@@ -231,10 +222,6 @@ export default class Settings extends Component {
this.handleChange("config_file", e.target.value);
}
handleFallbackChange(e) {
this.handleChange("fallback", e.target.checked);
}
handleChange(prop, value) {
const { dispatch, drone, repo } = this.props;
let data = {};