fix OSS build for v1.4.0.
This commit is contained in:
parent
807738d597
commit
3a7ae654fc
7 changed files with 89 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
|||
2. Install go 1.11 or later with Go modules enabled
|
||||
3. Install binaries to $GOPATH/bin
|
||||
|
||||
go install -tags oss,nolimit github.com/drone/drone/cmd/drone-server
|
||||
go install -tags "oss nolimit" github.com/drone/drone/cmd/drone-server
|
||||
|
||||
4. Start the server at localhost:8080
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/drone/drone/handler/api/render"
|
||||
)
|
||||
|
||||
var notImplemented = func(w http.ResponseWriter, r *http.Request) {
|
||||
var rollbackNotImplemented = func(w http.ResponseWriter, r *http.Request) {
|
||||
render.NotImplemented(w, render.ErrNotImplemented)
|
||||
}
|
||||
|
||||
|
@ -33,5 +33,5 @@ func HandleRollback(
|
|||
core.BuildStore,
|
||||
core.Triggerer,
|
||||
) http.HandlerFunc {
|
||||
return notImplemented
|
||||
return rollbackNotImplemented
|
||||
}
|
||||
|
|
27
plugin/converter/legacy_oss.go
Normal file
27
plugin/converter/legacy_oss.go
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2019 Drone IO, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build oss
|
||||
|
||||
package converter
|
||||
|
||||
import (
|
||||
"github.com/drone/drone/core"
|
||||
)
|
||||
|
||||
// Legacy returns a conversion service that converts the
|
||||
// legacy 0.8 file to a yaml file.
|
||||
func Legacy(enabled bool) core.ConvertService {
|
||||
return new(noop)
|
||||
}
|
|
@ -12,6 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build !oss
|
||||
|
||||
package converter
|
||||
|
||||
import (
|
||||
|
|
29
plugin/converter/memoize_oss.go
Normal file
29
plugin/converter/memoize_oss.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2019 Drone IO, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build oss
|
||||
|
||||
package converter
|
||||
|
||||
import (
|
||||
"github.com/drone/drone/core"
|
||||
)
|
||||
|
||||
// Memoize caches the conversion results for subsequent calls.
|
||||
// This micro-optimization is intended for multi-pipeline
|
||||
// projects that would otherwise covert the file for each
|
||||
// pipeline execution.
|
||||
func Memoize(base core.ConvertService) core.ConvertService {
|
||||
return new(noop)
|
||||
}
|
27
plugin/converter/remote_oss.go
Normal file
27
plugin/converter/remote_oss.go
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2019 Drone IO, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build oss
|
||||
|
||||
package converter
|
||||
|
||||
import (
|
||||
"github.com/drone/drone/core"
|
||||
)
|
||||
|
||||
// Remote returns a conversion service that converts the
|
||||
// configuration file using a remote http service.
|
||||
func Remote(endpoint, signer string, skipVerify bool) core.ConvertService {
|
||||
return new(noop)
|
||||
}
|
|
@ -24,4 +24,4 @@ import (
|
|||
|
||||
type noop struct{}
|
||||
|
||||
func (noop) Validate(context.Context, *core.ConvertArgs) error { return nil }
|
||||
func (noop) Validate(context.Context, *core.ValidateArgs) error { return nil }
|
||||
|
|
Loading…
Reference in a new issue