mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-02 20:52:22 +00:00
Delete old fallbacks and compatible stuff (#791)
Drop ... * ... DRONE_ and deprecated pipeline environment vars * ... deprecated sqlite3 file path
This commit is contained in:
parent
6a2b7586e5
commit
c79d49c862
3 changed files with 4 additions and 12 deletions
|
@ -92,7 +92,7 @@ func setupStore(c *cli.Context) (store.Store, error) {
|
|||
return store, nil
|
||||
}
|
||||
|
||||
// TODO: convert it to a check and fail hard only function in v0.16.0 to be able to remove it in v0.17.0
|
||||
// TODO: remove it in v1.1.0
|
||||
// TODO: add it to the "how to migrate from drone docs"
|
||||
func fallbackSqlite3File(path string) (string, error) {
|
||||
const dockerDefaultPath = "/var/lib/woodpecker/woodpecker.sqlite"
|
||||
|
@ -149,9 +149,7 @@ func fallbackSqlite3File(path string) (string, error) {
|
|||
// file is still at old location
|
||||
_, err = os.Stat(dockerOldPath)
|
||||
if err == nil {
|
||||
// TODO: use log.Fatal()... in next version
|
||||
log.Error().Msgf("found sqlite3 file at deprecated path '%s', please move it to '%s' and update your volume path if necessary", dockerOldPath, dockerDefaultPath)
|
||||
return dockerOldPath, nil
|
||||
log.Fatal().Msgf("found sqlite3 file at old path '%s', please move it to '%s' and update your volume path if necessary", dockerOldPath, dockerDefaultPath)
|
||||
}
|
||||
|
||||
// file does not exist at all
|
||||
|
|
|
@ -187,7 +187,8 @@ func (m *Metadata) Environ() map[string]string {
|
|||
"CI_SYSTEM_PLATFORM": m.Sys.Platform, // will be set by pipeline platform option or by agent
|
||||
"CI_SYSTEM_VERSION": version.Version,
|
||||
|
||||
"CI_SYSTEM_ARCH": m.Sys.Platform, // TODO: remove after next version
|
||||
// DEPRECATED
|
||||
"CI_SYSTEM_ARCH": m.Sys.Platform, // TODO: remove after v1.0.x version
|
||||
}
|
||||
if m.Curr.Event == EventTag {
|
||||
params["CI_COMMIT_TAG"] = strings.TrimPrefix(m.Curr.Commit.Ref, "refs/tags/")
|
||||
|
|
|
@ -206,13 +206,6 @@ func (r *Runtime) execAll(steps []*backend.Step) <-chan error {
|
|||
|
||||
// Executes the step and returns the state and error.
|
||||
func (r *Runtime) exec(step *backend.Step) (*backend.State, error) {
|
||||
// TODO: using DRONE_ will be deprecated with 0.15.0. remove fallback with following release
|
||||
for key, value := range step.Environment {
|
||||
if strings.HasPrefix(key, "CI_") {
|
||||
step.Environment[strings.Replace(key, "CI_", "DRONE_", 1)] = value
|
||||
}
|
||||
}
|
||||
|
||||
if err := r.engine.Exec(r.ctx, step); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue