From 0d322e10f26347100855f9dfa46cfeefb024cf5e Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Sun, 10 Feb 2019 11:00:16 -0800 Subject: [PATCH] add license headers --- main.go | 4 +++ samples/complex.yml | 26 +---------------- yaml/build.go | 14 +++++++++ yaml/build_test.go | 4 +++ yaml/compiler/clone.go | 14 +++++++++ yaml/compiler/clone_test.go | 4 +++ yaml/compiler/compiler.go | 14 +++++++++ yaml/compiler/convert.go | 14 +++++++++ yaml/compiler/convert_test.go | 4 +++ yaml/compiler/dind.go | 14 +++++++++ yaml/compiler/dind_test.go | 4 +++ yaml/compiler/encode.go | 14 +++++++++ yaml/compiler/encode_test.go | 4 +++ yaml/compiler/image/image.go | 14 +++++++++ yaml/compiler/image/image_test.go | 4 +++ yaml/compiler/internal/rand/rand.go | 14 +++++++++ yaml/compiler/script_posix.go | 14 +++++++++ yaml/compiler/script_posix_test.go | 4 +++ yaml/compiler/script_win.go | 14 +++++++++ yaml/compiler/script_win_test.go | 4 +++ yaml/compiler/skip.go | 14 +++++++++ yaml/compiler/skip_test.go | 4 +++ yaml/compiler/step.go | 14 +++++++++ yaml/compiler/transform/auths.go | 14 +++++++++ yaml/compiler/transform/auths_test.go | 4 +++ yaml/compiler/transform/combine.go | 14 +++++++++ yaml/compiler/transform/combine_test.go | 4 +++ yaml/compiler/transform/env.go | 14 +++++++++ yaml/compiler/transform/env_test.go | 4 +++ yaml/compiler/transform/filter.go | 14 +++++++++ yaml/compiler/transform/filter_test.go | 4 +++ yaml/compiler/transform/labels.go | 14 +++++++++ yaml/compiler/transform/labels_test.go | 4 +++ yaml/compiler/transform/limits.go | 15 ++++++++++ yaml/compiler/transform/limits_test.go | 4 +++ yaml/compiler/transform/netrc.go | 14 +++++++++ yaml/compiler/transform/netrc_test.go | 4 +++ yaml/compiler/transform/network.go | 14 +++++++++ yaml/compiler/transform/network_test.go | 4 +++ yaml/compiler/transform/proxy.go | 14 +++++++++ yaml/compiler/transform/proxy_test.go | 4 +++ yaml/compiler/transform/secret.go | 14 +++++++++ yaml/compiler/transform/secret_test.go | 4 +++ yaml/compiler/transform/volume.go | 14 +++++++++ yaml/compiler/transform/volume_test.go | 4 +++ yaml/compiler/workspace.go | 14 +++++++++ yaml/compiler/workspace_test.go | 4 +++ yaml/cond.go | 15 ++++++++++ yaml/cond_test.go | 4 +++ yaml/converter/bitbucket/config.go | 4 +++ yaml/converter/bitbucket/config_test.go | 4 +++ yaml/converter/bitbucket/convert.go | 4 +++ yaml/converter/bitbucket/convert_test.go | 4 +++ yaml/converter/convert.go | 19 ++++-------- yaml/converter/convert_oss.go | 23 +++++++++++++++ yaml/converter/convert_oss_test.go | 17 +++++++++++ yaml/converter/convert_test.go | 6 ++++ yaml/converter/gitlab/config.go | 4 +++ yaml/converter/gitlab/convert.go | 4 +++ yaml/converter/gitlab/convert_test.go | 4 +++ yaml/converter/internal/string_slice.go | 4 +++ yaml/converter/internal/string_slice_test.go | 4 +++ yaml/converter/legacy/convert.go | 4 +++ yaml/converter/legacy/internal/config.go | 4 +++ yaml/converter/legacy/internal/config_test.go | 4 +++ yaml/converter/legacy/internal/constraint.go | 4 +++ yaml/converter/legacy/internal/container.go | 4 +++ .../legacy/internal/container_test.go | 4 +++ yaml/converter/legacy/internal/secret.go | 4 +++ yaml/converter/legacy/internal/secret_test.go | 4 +++ yaml/converter/legacy/internal/slice_map.go | 4 +++ .../legacy/internal/slice_map_test.go | 4 +++ .../converter/legacy/internal/string_slice.go | 4 +++ .../legacy/internal/string_slice_test.go | 4 +++ yaml/converter/legacy/internal/volume.go | 4 +++ yaml/converter/legacy/internal/volume_test.go | 4 +++ yaml/converter/legacy/match.go | 4 +++ yaml/converter/legacy/match_test.go | 4 +++ yaml/converter/legacy/matrix/matrix.go | 4 +++ yaml/converter/metadata.go | 28 ++++++++++++++++++ yaml/cron.go | 14 +++++++++ yaml/cron_test.go | 4 +++ yaml/env.go | 14 +++++++++ yaml/env_test.go | 4 +++ yaml/linter/config.go | 14 +++++++++ yaml/linter/config_test.go | 4 +++ yaml/linter/linter.go | 14 +++++++++ yaml/linter/linter_test.go | 4 +++ yaml/manifest.go | 29 +++++++++++++++++++ yaml/manifest_test.go | 7 +++-- yaml/param.go | 14 +++++++++ yaml/param_test.go | 4 +++ yaml/parse.go | 14 +++++++++ yaml/parse_test.go | 4 +++ yaml/pipeline.go | 14 +++++++++ yaml/pipeline_test.go | 4 +++ yaml/port.go | 14 +++++++++ yaml/port_test.go | 4 +++ yaml/pretty/container.go | 6 ++++ yaml/pretty/container_test.go | 6 ++++ yaml/pretty/cron.go | 6 ++++ yaml/pretty/cron_test.go | 6 ++++ yaml/pretty/pipeline.go | 9 ++++++ yaml/pretty/pipeline_test.go | 6 ++++ yaml/pretty/pretty.go | 6 ++++ yaml/pretty/pretty_oss.go | 29 +++++++++++++++++++ yaml/pretty/pretty_test.go | 6 ++++ yaml/pretty/registry.go | 6 ++++ yaml/pretty/registry_test.go | 6 ++++ yaml/pretty/secret.go | 6 ++++ yaml/pretty/secret_test.go | 6 ++++ yaml/pretty/signature.go | 6 ++++ yaml/pretty/signature_test.go | 6 ++++ yaml/pretty/util.go | 6 ++++ yaml/pretty/util_test.go | 6 ++++ yaml/pretty/writer.go | 6 ++++ yaml/pretty/writer_test.go | 6 ++++ yaml/push.go | 14 +++++++++ yaml/push_test.go | 4 +++ yaml/registry.go | 14 +++++++++ yaml/registry_test.go | 4 +++ yaml/secret.go | 14 +++++++++ yaml/secret_test.go | 4 +++ yaml/signature.go | 14 +++++++++ yaml/signature_test.go | 4 +++ yaml/unit.go | 14 +++++++++ yaml/unit_test.go | 4 +++ 127 files changed, 1036 insertions(+), 41 deletions(-) create mode 100644 yaml/converter/convert_oss.go create mode 100644 yaml/converter/convert_oss_test.go create mode 100644 yaml/converter/metadata.go create mode 100644 yaml/pretty/pretty_oss.go diff --git a/main.go b/main.go index 7215c67..dcd7a94 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package main import ( diff --git a/samples/complex.yml b/samples/complex.yml index e94c188..c952a8c 100644 --- a/samples/complex.yml +++ b/samples/complex.yml @@ -38,34 +38,10 @@ steps: settings: room: general token: - $secret: token + from_secret: token node: disk: ssd depends_on: - build - ---- -kind: cron -name: nightly -spec: - schedule: "1 * * * *" - branch: master - deployment: - target: production - ---- -kind: secret -type: encrypted - -data: - token: N2NmYjA3ODQwNTY1ODFlY2E5MGJmOWI1NDk0NDFhMTEK - ---- -kind: registry -type: encrypted - -data: - index.drone.io: N2NmYjA3ODQwNTY1ODFlY2E5MGJmOWI1NDk0NDFhMTEK - diff --git a/yaml/build.go b/yaml/build.go index 73ab569..04f48ad 100644 --- a/yaml/build.go +++ b/yaml/build.go @@ -1,3 +1,17 @@ +// 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. + package yaml type ( diff --git a/yaml/build_test.go b/yaml/build_test.go index 4f39526..83c5f0c 100644 --- a/yaml/build_test.go +++ b/yaml/build_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/compiler/clone.go b/yaml/compiler/clone.go index f88c940..33386cf 100644 --- a/yaml/compiler/clone.go +++ b/yaml/compiler/clone.go @@ -1,3 +1,17 @@ +// 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. + package compiler import ( diff --git a/yaml/compiler/clone_test.go b/yaml/compiler/clone_test.go index 83d4013..ef59253 100644 --- a/yaml/compiler/clone_test.go +++ b/yaml/compiler/clone_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package compiler import ( diff --git a/yaml/compiler/compiler.go b/yaml/compiler/compiler.go index 3912d3c..b5884db 100644 --- a/yaml/compiler/compiler.go +++ b/yaml/compiler/compiler.go @@ -1,3 +1,17 @@ +// 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. + package compiler import ( diff --git a/yaml/compiler/convert.go b/yaml/compiler/convert.go index f3ef05b..4a12117 100644 --- a/yaml/compiler/convert.go +++ b/yaml/compiler/convert.go @@ -1,3 +1,17 @@ +// 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. + package compiler import ( diff --git a/yaml/compiler/convert_test.go b/yaml/compiler/convert_test.go index d9f3fbb..8feabac 100644 --- a/yaml/compiler/convert_test.go +++ b/yaml/compiler/convert_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package compiler import ( diff --git a/yaml/compiler/dind.go b/yaml/compiler/dind.go index 72f9c0a..84f40eb 100644 --- a/yaml/compiler/dind.go +++ b/yaml/compiler/dind.go @@ -1,3 +1,17 @@ +// 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. + package compiler import ( diff --git a/yaml/compiler/dind_test.go b/yaml/compiler/dind_test.go index 707ace6..afed5b1 100644 --- a/yaml/compiler/dind_test.go +++ b/yaml/compiler/dind_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package compiler import ( diff --git a/yaml/compiler/encode.go b/yaml/compiler/encode.go index 2e65cb3..9b11682 100644 --- a/yaml/compiler/encode.go +++ b/yaml/compiler/encode.go @@ -1,3 +1,17 @@ +// 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. + package compiler import ( diff --git a/yaml/compiler/encode_test.go b/yaml/compiler/encode_test.go index 29c3b65..eeb0192 100644 --- a/yaml/compiler/encode_test.go +++ b/yaml/compiler/encode_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package compiler import "testing" diff --git a/yaml/compiler/image/image.go b/yaml/compiler/image/image.go index 79f13fa..52dc3e4 100644 --- a/yaml/compiler/image/image.go +++ b/yaml/compiler/image/image.go @@ -1,3 +1,17 @@ +// 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. + package image import "github.com/docker/distribution/reference" diff --git a/yaml/compiler/image/image_test.go b/yaml/compiler/image/image_test.go index cddd396..61c08a5 100644 --- a/yaml/compiler/image/image_test.go +++ b/yaml/compiler/image/image_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package image import "testing" diff --git a/yaml/compiler/internal/rand/rand.go b/yaml/compiler/internal/rand/rand.go index 935d68a..dc92910 100644 --- a/yaml/compiler/internal/rand/rand.go +++ b/yaml/compiler/internal/rand/rand.go @@ -1,3 +1,17 @@ +// 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. + package rand import ( diff --git a/yaml/compiler/script_posix.go b/yaml/compiler/script_posix.go index 66baede..ea5b2ed 100644 --- a/yaml/compiler/script_posix.go +++ b/yaml/compiler/script_posix.go @@ -1,3 +1,17 @@ +// 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. + package compiler import ( diff --git a/yaml/compiler/script_posix_test.go b/yaml/compiler/script_posix_test.go index a20d4fe..5f10de1 100644 --- a/yaml/compiler/script_posix_test.go +++ b/yaml/compiler/script_posix_test.go @@ -1 +1,5 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package compiler diff --git a/yaml/compiler/script_win.go b/yaml/compiler/script_win.go index 35bc1db..b69496c 100644 --- a/yaml/compiler/script_win.go +++ b/yaml/compiler/script_win.go @@ -1,3 +1,17 @@ +// 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. + package compiler import ( diff --git a/yaml/compiler/script_win_test.go b/yaml/compiler/script_win_test.go index a20d4fe..5f10de1 100644 --- a/yaml/compiler/script_win_test.go +++ b/yaml/compiler/script_win_test.go @@ -1 +1,5 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package compiler diff --git a/yaml/compiler/skip.go b/yaml/compiler/skip.go index 7e512e5..4c217b1 100644 --- a/yaml/compiler/skip.go +++ b/yaml/compiler/skip.go @@ -1,3 +1,17 @@ +// 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. + package compiler import "github.com/drone/drone-yaml/yaml" diff --git a/yaml/compiler/skip_test.go b/yaml/compiler/skip_test.go index 7147079..683b77d 100644 --- a/yaml/compiler/skip_test.go +++ b/yaml/compiler/skip_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package compiler import ( diff --git a/yaml/compiler/step.go b/yaml/compiler/step.go index 2516e7a..a6a5a0f 100644 --- a/yaml/compiler/step.go +++ b/yaml/compiler/step.go @@ -1,3 +1,17 @@ +// 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. + package compiler import ( diff --git a/yaml/compiler/transform/auths.go b/yaml/compiler/transform/auths.go index 7153942..7399500 100644 --- a/yaml/compiler/transform/auths.go +++ b/yaml/compiler/transform/auths.go @@ -1,3 +1,17 @@ +// 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. + package transform import "github.com/drone/drone-runtime/engine" diff --git a/yaml/compiler/transform/auths_test.go b/yaml/compiler/transform/auths_test.go index 9047d6b..aabcc7c 100644 --- a/yaml/compiler/transform/auths_test.go +++ b/yaml/compiler/transform/auths_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/transform/combine.go b/yaml/compiler/transform/combine.go index e6257c2..45f6465 100644 --- a/yaml/compiler/transform/combine.go +++ b/yaml/compiler/transform/combine.go @@ -1,3 +1,17 @@ +// 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. + package transform import "github.com/drone/drone-runtime/engine" diff --git a/yaml/compiler/transform/combine_test.go b/yaml/compiler/transform/combine_test.go index 4ca4f4f..4db3f76 100644 --- a/yaml/compiler/transform/combine_test.go +++ b/yaml/compiler/transform/combine_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/transform/env.go b/yaml/compiler/transform/env.go index 3dfe856..c892e75 100644 --- a/yaml/compiler/transform/env.go +++ b/yaml/compiler/transform/env.go @@ -1,3 +1,17 @@ +// 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. + package transform import "github.com/drone/drone-runtime/engine" diff --git a/yaml/compiler/transform/env_test.go b/yaml/compiler/transform/env_test.go index 3797137..28e3af0 100644 --- a/yaml/compiler/transform/env_test.go +++ b/yaml/compiler/transform/env_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/transform/filter.go b/yaml/compiler/transform/filter.go index e18da81..ae96573 100644 --- a/yaml/compiler/transform/filter.go +++ b/yaml/compiler/transform/filter.go @@ -1,3 +1,17 @@ +// 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. + package transform import "github.com/drone/drone-runtime/engine" diff --git a/yaml/compiler/transform/filter_test.go b/yaml/compiler/transform/filter_test.go index c905e80..f2eb83d 100644 --- a/yaml/compiler/transform/filter_test.go +++ b/yaml/compiler/transform/filter_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/transform/labels.go b/yaml/compiler/transform/labels.go index 45b80a5..934b41a 100644 --- a/yaml/compiler/transform/labels.go +++ b/yaml/compiler/transform/labels.go @@ -1,3 +1,17 @@ +// 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. + package transform import "github.com/drone/drone-runtime/engine" diff --git a/yaml/compiler/transform/labels_test.go b/yaml/compiler/transform/labels_test.go index 852d9a2..9f622fe 100644 --- a/yaml/compiler/transform/labels_test.go +++ b/yaml/compiler/transform/labels_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/transform/limits.go b/yaml/compiler/transform/limits.go index 098c194..18d4a66 100644 --- a/yaml/compiler/transform/limits.go +++ b/yaml/compiler/transform/limits.go @@ -1,6 +1,21 @@ +// 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. + package transform import "github.com/drone/drone-runtime/engine" + // WithLimits is a transform function that applies // resource limits to the container processes. func WithLimits(memlimit int64, cpulimit int64) func(*engine.Spec) { diff --git a/yaml/compiler/transform/limits_test.go b/yaml/compiler/transform/limits_test.go index f9394f9..e464848 100644 --- a/yaml/compiler/transform/limits_test.go +++ b/yaml/compiler/transform/limits_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/transform/netrc.go b/yaml/compiler/transform/netrc.go index 4e4b916..dcf45ad 100644 --- a/yaml/compiler/transform/netrc.go +++ b/yaml/compiler/transform/netrc.go @@ -1,3 +1,17 @@ +// 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. + package transform import ( diff --git a/yaml/compiler/transform/netrc_test.go b/yaml/compiler/transform/netrc_test.go index f9d4b53..04a278b 100644 --- a/yaml/compiler/transform/netrc_test.go +++ b/yaml/compiler/transform/netrc_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/transform/network.go b/yaml/compiler/transform/network.go index 7bbe7a7..803db70 100644 --- a/yaml/compiler/transform/network.go +++ b/yaml/compiler/transform/network.go @@ -1,3 +1,17 @@ +// 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. + package transform import "github.com/drone/drone-runtime/engine" diff --git a/yaml/compiler/transform/network_test.go b/yaml/compiler/transform/network_test.go index 9cfe173..68c24b0 100644 --- a/yaml/compiler/transform/network_test.go +++ b/yaml/compiler/transform/network_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/transform/proxy.go b/yaml/compiler/transform/proxy.go index f997592..99e053c 100644 --- a/yaml/compiler/transform/proxy.go +++ b/yaml/compiler/transform/proxy.go @@ -1,3 +1,17 @@ +// 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. + package transform import ( diff --git a/yaml/compiler/transform/proxy_test.go b/yaml/compiler/transform/proxy_test.go index 5f381af..85b7ee5 100644 --- a/yaml/compiler/transform/proxy_test.go +++ b/yaml/compiler/transform/proxy_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/transform/secret.go b/yaml/compiler/transform/secret.go index 9e21606..439dfb3 100644 --- a/yaml/compiler/transform/secret.go +++ b/yaml/compiler/transform/secret.go @@ -1,3 +1,17 @@ +// 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. + package transform import ( diff --git a/yaml/compiler/transform/secret_test.go b/yaml/compiler/transform/secret_test.go index a9d67b3..5066e78 100644 --- a/yaml/compiler/transform/secret_test.go +++ b/yaml/compiler/transform/secret_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/transform/volume.go b/yaml/compiler/transform/volume.go index a8f5ad6..8268310 100644 --- a/yaml/compiler/transform/volume.go +++ b/yaml/compiler/transform/volume.go @@ -1,3 +1,17 @@ +// 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. + package transform import ( diff --git a/yaml/compiler/transform/volume_test.go b/yaml/compiler/transform/volume_test.go index b1cab16..4dffcb8 100644 --- a/yaml/compiler/transform/volume_test.go +++ b/yaml/compiler/transform/volume_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package transform import ( diff --git a/yaml/compiler/workspace.go b/yaml/compiler/workspace.go index a3b6c1e..600f4af 100644 --- a/yaml/compiler/workspace.go +++ b/yaml/compiler/workspace.go @@ -1,3 +1,17 @@ +// 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. + package compiler import ( diff --git a/yaml/compiler/workspace_test.go b/yaml/compiler/workspace_test.go index 024489d..5477215 100644 --- a/yaml/compiler/workspace_test.go +++ b/yaml/compiler/workspace_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package compiler import ( diff --git a/yaml/cond.go b/yaml/cond.go index 4aefd17..713a16d 100644 --- a/yaml/cond.go +++ b/yaml/cond.go @@ -1,9 +1,24 @@ +// 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. + package yaml import filepath "github.com/bmatcuk/doublestar" // Conditions defines a group of conditions. type Conditions struct { + Cron Condition `json:"cron,omitempty"` Ref Condition `json:"ref,omitempty"` Repo Condition `json:"repo,omitempty"` Instance Condition `json:"instance,omitempty"` diff --git a/yaml/cond_test.go b/yaml/cond_test.go index 85fa56d..efd9885 100644 --- a/yaml/cond_test.go +++ b/yaml/cond_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/converter/bitbucket/config.go b/yaml/converter/bitbucket/config.go index b66d534..575beeb 100644 --- a/yaml/converter/bitbucket/config.go +++ b/yaml/converter/bitbucket/config.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package bitbucket import ( diff --git a/yaml/converter/bitbucket/config_test.go b/yaml/converter/bitbucket/config_test.go index 2649fca..bb11b2f 100644 --- a/yaml/converter/bitbucket/config_test.go +++ b/yaml/converter/bitbucket/config_test.go @@ -1 +1,5 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package bitbucket diff --git a/yaml/converter/bitbucket/convert.go b/yaml/converter/bitbucket/convert.go index d215017..436b1a7 100644 --- a/yaml/converter/bitbucket/convert.go +++ b/yaml/converter/bitbucket/convert.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package bitbucket import ( diff --git a/yaml/converter/bitbucket/convert_test.go b/yaml/converter/bitbucket/convert_test.go index 2e5e18d..62455ce 100644 --- a/yaml/converter/bitbucket/convert_test.go +++ b/yaml/converter/bitbucket/convert_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package bitbucket import ( diff --git a/yaml/converter/convert.go b/yaml/converter/convert.go index 0c1e283..f60e7ba 100644 --- a/yaml/converter/convert.go +++ b/yaml/converter/convert.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package converter import ( @@ -6,19 +12,6 @@ import ( "github.com/drone/drone-yaml/yaml/converter/legacy" ) -// Metadata provides additional metadata used to -// convert the configuration file format. -type Metadata struct { - // Filename of the configuration file, helps - // determine the yaml configuration format. - Filename string - - // Ref of the commit use to choose the correct - // pipeline if the configuration format defines - // multiple pipelines (like Bitbucket) - Ref string -} - // Convert converts the yaml configuration file from // the legacy format to the 1.0+ format. func Convert(d []byte, m Metadata) ([]byte, error) { diff --git a/yaml/converter/convert_oss.go b/yaml/converter/convert_oss.go new file mode 100644 index 0000000..163f706 --- /dev/null +++ b/yaml/converter/convert_oss.go @@ -0,0 +1,23 @@ +// 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 + +// Convert converts the yaml configuration file from +// the legacy format to the 1.0+ format. +func Convert(d []byte, m Metadata) ([]byte, error) { + return d, nil +} diff --git a/yaml/converter/convert_oss_test.go b/yaml/converter/convert_oss_test.go new file mode 100644 index 0000000..a39aae0 --- /dev/null +++ b/yaml/converter/convert_oss_test.go @@ -0,0 +1,17 @@ +// 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 diff --git a/yaml/converter/convert_test.go b/yaml/converter/convert_test.go index 89f617e..587966c 100644 --- a/yaml/converter/convert_test.go +++ b/yaml/converter/convert_test.go @@ -1 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package converter diff --git a/yaml/converter/gitlab/config.go b/yaml/converter/gitlab/config.go index 8299c73..0e1b6d7 100644 --- a/yaml/converter/gitlab/config.go +++ b/yaml/converter/gitlab/config.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package gitlab import ( diff --git a/yaml/converter/gitlab/convert.go b/yaml/converter/gitlab/convert.go index 608979f..eeb8f6c 100644 --- a/yaml/converter/gitlab/convert.go +++ b/yaml/converter/gitlab/convert.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package gitlab import ( diff --git a/yaml/converter/gitlab/convert_test.go b/yaml/converter/gitlab/convert_test.go index 0001f47..32f2910 100644 --- a/yaml/converter/gitlab/convert_test.go +++ b/yaml/converter/gitlab/convert_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package gitlab import ( diff --git a/yaml/converter/internal/string_slice.go b/yaml/converter/internal/string_slice.go index 88eca58..567b2f7 100644 --- a/yaml/converter/internal/string_slice.go +++ b/yaml/converter/internal/string_slice.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package internal // StringSlice represents a slice of strings or a string. diff --git a/yaml/converter/internal/string_slice_test.go b/yaml/converter/internal/string_slice_test.go index 5540bba..9e0e20a 100644 --- a/yaml/converter/internal/string_slice_test.go +++ b/yaml/converter/internal/string_slice_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package internal import ( diff --git a/yaml/converter/legacy/convert.go b/yaml/converter/legacy/convert.go index 3ff1c4f..15e5880 100644 --- a/yaml/converter/legacy/convert.go +++ b/yaml/converter/legacy/convert.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package legacy import "github.com/drone/drone-yaml/yaml/converter/legacy/internal" diff --git a/yaml/converter/legacy/internal/config.go b/yaml/converter/legacy/internal/config.go index cf5676b..d292feb 100644 --- a/yaml/converter/legacy/internal/config.go +++ b/yaml/converter/legacy/internal/config.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/converter/legacy/internal/config_test.go b/yaml/converter/legacy/internal/config_test.go index 8ee736b..b301743 100644 --- a/yaml/converter/legacy/internal/config_test.go +++ b/yaml/converter/legacy/internal/config_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/converter/legacy/internal/constraint.go b/yaml/converter/legacy/internal/constraint.go index e11f0a7..eaf7ca3 100644 --- a/yaml/converter/legacy/internal/constraint.go +++ b/yaml/converter/legacy/internal/constraint.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml type ( diff --git a/yaml/converter/legacy/internal/container.go b/yaml/converter/legacy/internal/container.go index 167667d..68986ca 100644 --- a/yaml/converter/legacy/internal/container.go +++ b/yaml/converter/legacy/internal/container.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/converter/legacy/internal/container_test.go b/yaml/converter/legacy/internal/container_test.go index 72f5087..2f8b1cf 100644 --- a/yaml/converter/legacy/internal/container_test.go +++ b/yaml/converter/legacy/internal/container_test.go @@ -1 +1,5 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml diff --git a/yaml/converter/legacy/internal/secret.go b/yaml/converter/legacy/internal/secret.go index cac8acc..66bae93 100644 --- a/yaml/converter/legacy/internal/secret.go +++ b/yaml/converter/legacy/internal/secret.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml type ( diff --git a/yaml/converter/legacy/internal/secret_test.go b/yaml/converter/legacy/internal/secret_test.go index 6e4f844..65c4129 100644 --- a/yaml/converter/legacy/internal/secret_test.go +++ b/yaml/converter/legacy/internal/secret_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/converter/legacy/internal/slice_map.go b/yaml/converter/legacy/internal/slice_map.go index 2d7737a..0d06302 100644 --- a/yaml/converter/legacy/internal/slice_map.go +++ b/yaml/converter/legacy/internal/slice_map.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import "strings" diff --git a/yaml/converter/legacy/internal/slice_map_test.go b/yaml/converter/legacy/internal/slice_map_test.go index b4f4af3..0e31d81 100644 --- a/yaml/converter/legacy/internal/slice_map_test.go +++ b/yaml/converter/legacy/internal/slice_map_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/converter/legacy/internal/string_slice.go b/yaml/converter/legacy/internal/string_slice.go index f4d1b6e..243647c 100644 --- a/yaml/converter/legacy/internal/string_slice.go +++ b/yaml/converter/legacy/internal/string_slice.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml // StringSlice represents a slice of strings or a string. diff --git a/yaml/converter/legacy/internal/string_slice_test.go b/yaml/converter/legacy/internal/string_slice_test.go index e5e712e..9cfece6 100644 --- a/yaml/converter/legacy/internal/string_slice_test.go +++ b/yaml/converter/legacy/internal/string_slice_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/converter/legacy/internal/volume.go b/yaml/converter/legacy/internal/volume.go index 024bfe3..314934e 100644 --- a/yaml/converter/legacy/internal/volume.go +++ b/yaml/converter/legacy/internal/volume.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import "strings" diff --git a/yaml/converter/legacy/internal/volume_test.go b/yaml/converter/legacy/internal/volume_test.go index 7f316ed..dbbda19 100644 --- a/yaml/converter/legacy/internal/volume_test.go +++ b/yaml/converter/legacy/internal/volume_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/converter/legacy/match.go b/yaml/converter/legacy/match.go index 8b579e8..d9cc49c 100644 --- a/yaml/converter/legacy/match.go +++ b/yaml/converter/legacy/match.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package legacy import ( diff --git a/yaml/converter/legacy/match_test.go b/yaml/converter/legacy/match_test.go index 8231e1d..0039861 100644 --- a/yaml/converter/legacy/match_test.go +++ b/yaml/converter/legacy/match_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package legacy import "testing" diff --git a/yaml/converter/legacy/matrix/matrix.go b/yaml/converter/legacy/matrix/matrix.go index 76a0f6b..9a9d5a3 100644 --- a/yaml/converter/legacy/matrix/matrix.go +++ b/yaml/converter/legacy/matrix/matrix.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package matrix import ( diff --git a/yaml/converter/metadata.go b/yaml/converter/metadata.go new file mode 100644 index 0000000..a3e3fff --- /dev/null +++ b/yaml/converter/metadata.go @@ -0,0 +1,28 @@ +// 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. + +package converter + +// Metadata provides additional metadata used to +// convert the configuration file format. +type Metadata struct { + // Filename of the configuration file, helps + // determine the yaml configuration format. + Filename string + + // Ref of the commit use to choose the correct + // pipeline if the configuration format defines + // multiple pipelines (like Bitbucket) + Ref string +} diff --git a/yaml/cron.go b/yaml/cron.go index 03a0de5..a0d3471 100644 --- a/yaml/cron.go +++ b/yaml/cron.go @@ -1,3 +1,17 @@ +// 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. + package yaml import "errors" diff --git a/yaml/cron_test.go b/yaml/cron_test.go index e516ac7..0451617 100644 --- a/yaml/cron_test.go +++ b/yaml/cron_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import "testing" diff --git a/yaml/env.go b/yaml/env.go index 653306f..67caa56 100644 --- a/yaml/env.go +++ b/yaml/env.go @@ -1,3 +1,17 @@ +// 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. + package yaml type ( diff --git a/yaml/env_test.go b/yaml/env_test.go index 910d610..b6251e4 100644 --- a/yaml/env_test.go +++ b/yaml/env_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/linter/config.go b/yaml/linter/config.go index f388f34..2e466e1 100644 --- a/yaml/linter/config.go +++ b/yaml/linter/config.go @@ -1,3 +1,17 @@ +// 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. + package linter import ( diff --git a/yaml/linter/config_test.go b/yaml/linter/config_test.go index 6bc4d0b..35973a2 100644 --- a/yaml/linter/config_test.go +++ b/yaml/linter/config_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package linter import ( diff --git a/yaml/linter/linter.go b/yaml/linter/linter.go index a096c87..0b1c4f0 100644 --- a/yaml/linter/linter.go +++ b/yaml/linter/linter.go @@ -1,3 +1,17 @@ +// 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. + package linter import ( diff --git a/yaml/linter/linter_test.go b/yaml/linter/linter_test.go index 6533710..4717981 100644 --- a/yaml/linter/linter_test.go +++ b/yaml/linter/linter_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package linter import ( diff --git a/yaml/manifest.go b/yaml/manifest.go index 366ef42..7ab4093 100644 --- a/yaml/manifest.go +++ b/yaml/manifest.go @@ -1,8 +1,25 @@ +// 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. + package yaml import ( + "bytes" "encoding/json" "errors" + + "gopkg.in/yaml.v2" ) // Resource enums. @@ -89,3 +106,15 @@ func (m *Manifest) MarshalJSON() ([]byte, error) { func (m *Manifest) MarshalYAML() (interface{}, error) { return nil, errors.New("yaml: marshal not implemented") } + +// Encode encodes the manifest in Yaml format. +func (m *Manifest) Encode() ([]byte, error) { + buf := new(bytes.Buffer) + enc := yaml.NewEncoder(buf) + for _, res := range m.Resources { + if err := enc.Encode(res); err != nil { + return nil, err + } + } + return buf.Bytes(), nil +} diff --git a/yaml/manifest_test.go b/yaml/manifest_test.go index 24dd549..94fd553 100644 --- a/yaml/manifest_test.go +++ b/yaml/manifest_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( @@ -24,9 +28,6 @@ func diff(file string) (string, error) { if err != nil { return "", err } - // enc := json.NewEncoder(os.Stdout) - // enc.SetIndent("", " ") - // enc.Encode(a) d, err := ioutil.ReadFile(file + ".golden") if err != nil { return "", err diff --git a/yaml/param.go b/yaml/param.go index 3ca9de1..61fac2c 100644 --- a/yaml/param.go +++ b/yaml/param.go @@ -1,3 +1,17 @@ +// 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. + package yaml type ( diff --git a/yaml/param_test.go b/yaml/param_test.go index 1982ff6..fd5a2d7 100644 --- a/yaml/param_test.go +++ b/yaml/param_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/parse.go b/yaml/parse.go index 48cd0cb..b4ffd62 100644 --- a/yaml/parse.go +++ b/yaml/parse.go @@ -1,3 +1,17 @@ +// 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. + package yaml import ( diff --git a/yaml/parse_test.go b/yaml/parse_test.go index f7b86c1..6ae7eb4 100644 --- a/yaml/parse_test.go +++ b/yaml/parse_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/pipeline.go b/yaml/pipeline.go index 45ca13e..228b498 100644 --- a/yaml/pipeline.go +++ b/yaml/pipeline.go @@ -1,3 +1,17 @@ +// 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. + package yaml // Pipeline is a resource that defines a continuous diff --git a/yaml/pipeline_test.go b/yaml/pipeline_test.go index 4840887..b486e04 100644 --- a/yaml/pipeline_test.go +++ b/yaml/pipeline_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import "testing" diff --git a/yaml/port.go b/yaml/port.go index 79d9085..bd8b1c8 100644 --- a/yaml/port.go +++ b/yaml/port.go @@ -1,3 +1,17 @@ +// 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. + package yaml type ( diff --git a/yaml/port_test.go b/yaml/port_test.go index 410f5eb..86f9ee9 100644 --- a/yaml/port_test.go +++ b/yaml/port_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/pretty/container.go b/yaml/pretty/container.go index 6480f55..c47f44e 100644 --- a/yaml/pretty/container.go +++ b/yaml/pretty/container.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import ( diff --git a/yaml/pretty/container_test.go b/yaml/pretty/container_test.go index fac5cb9..631414b 100644 --- a/yaml/pretty/container_test.go +++ b/yaml/pretty/container_test.go @@ -1 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty diff --git a/yaml/pretty/cron.go b/yaml/pretty/cron.go index 739cc70..bbfe9e1 100644 --- a/yaml/pretty/cron.go +++ b/yaml/pretty/cron.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import "github.com/drone/drone-yaml/yaml" diff --git a/yaml/pretty/cron_test.go b/yaml/pretty/cron_test.go index c783b33..2042ea9 100644 --- a/yaml/pretty/cron_test.go +++ b/yaml/pretty/cron_test.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import "testing" diff --git a/yaml/pretty/pipeline.go b/yaml/pretty/pipeline.go index 874ba6b..58fbe30 100644 --- a/yaml/pretty/pipeline.go +++ b/yaml/pretty/pipeline.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import ( @@ -106,6 +112,9 @@ func printConditions(w writer, name string, v yaml.Conditions) { if !isConditionEmpty(v.Branch) { printCondition(w, "branch", v.Branch) } + if !isConditionEmpty(v.Cron) { + printCondition(w, "cron", v.Cron) + } if !isConditionEmpty(v.Event) { printCondition(w, "event", v.Event) } diff --git a/yaml/pretty/pipeline_test.go b/yaml/pretty/pipeline_test.go index c55411b..c53d600 100644 --- a/yaml/pretty/pipeline_test.go +++ b/yaml/pretty/pipeline_test.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import "testing" diff --git a/yaml/pretty/pretty.go b/yaml/pretty/pretty.go index be3a671..10ca4bf 100644 --- a/yaml/pretty/pretty.go +++ b/yaml/pretty/pretty.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import ( diff --git a/yaml/pretty/pretty_oss.go b/yaml/pretty/pretty_oss.go new file mode 100644 index 0000000..e081fa6 --- /dev/null +++ b/yaml/pretty/pretty_oss.go @@ -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 pretty + +import ( + "io" + + "github.com/drone/drone-yaml/yaml" +) + +// Print pretty prints the manifest. +func Print(w io.Writer, v *yaml.Manifest) { + d, _ := v.Encode() + w.Write(d) +} diff --git a/yaml/pretty/pretty_test.go b/yaml/pretty/pretty_test.go index 4fd1d0a..efdca5e 100644 --- a/yaml/pretty/pretty_test.go +++ b/yaml/pretty/pretty_test.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import ( diff --git a/yaml/pretty/registry.go b/yaml/pretty/registry.go index fcc967a..df1d573 100644 --- a/yaml/pretty/registry.go +++ b/yaml/pretty/registry.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import ( diff --git a/yaml/pretty/registry_test.go b/yaml/pretty/registry_test.go index 599822b..415a8b3 100644 --- a/yaml/pretty/registry_test.go +++ b/yaml/pretty/registry_test.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import "testing" diff --git a/yaml/pretty/secret.go b/yaml/pretty/secret.go index 651b63c..811be30 100644 --- a/yaml/pretty/secret.go +++ b/yaml/pretty/secret.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import ( diff --git a/yaml/pretty/secret_test.go b/yaml/pretty/secret_test.go index b98246d..af888de 100644 --- a/yaml/pretty/secret_test.go +++ b/yaml/pretty/secret_test.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import "testing" diff --git a/yaml/pretty/signature.go b/yaml/pretty/signature.go index e688899..b6ca49a 100644 --- a/yaml/pretty/signature.go +++ b/yaml/pretty/signature.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import ( diff --git a/yaml/pretty/signature_test.go b/yaml/pretty/signature_test.go index aaa3a61..ed42aed 100644 --- a/yaml/pretty/signature_test.go +++ b/yaml/pretty/signature_test.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import "testing" diff --git a/yaml/pretty/util.go b/yaml/pretty/util.go index 9987946..ad52949 100644 --- a/yaml/pretty/util.go +++ b/yaml/pretty/util.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import "github.com/drone/drone-yaml/yaml" diff --git a/yaml/pretty/util_test.go b/yaml/pretty/util_test.go index d5ff48d..35c30aa 100644 --- a/yaml/pretty/util_test.go +++ b/yaml/pretty/util_test.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import ( diff --git a/yaml/pretty/writer.go b/yaml/pretty/writer.go index b7e8051..476398f 100644 --- a/yaml/pretty/writer.go +++ b/yaml/pretty/writer.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import ( diff --git a/yaml/pretty/writer_test.go b/yaml/pretty/writer_test.go index 9a8fc15..d4dc85b 100644 --- a/yaml/pretty/writer_test.go +++ b/yaml/pretty/writer_test.go @@ -1,3 +1,9 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + +// +build !oss + package pretty import ( diff --git a/yaml/push.go b/yaml/push.go index d65b2b2..130394c 100644 --- a/yaml/push.go +++ b/yaml/push.go @@ -1,3 +1,17 @@ +// 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. + package yaml type ( diff --git a/yaml/push_test.go b/yaml/push_test.go index a7901b1..7ed0d02 100644 --- a/yaml/push_test.go +++ b/yaml/push_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/registry.go b/yaml/registry.go index 40c68dd..4e1902f 100644 --- a/yaml/registry.go +++ b/yaml/registry.go @@ -1,3 +1,17 @@ +// 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. + package yaml import "errors" diff --git a/yaml/registry_test.go b/yaml/registry_test.go index 8655b65..ad12ce9 100644 --- a/yaml/registry_test.go +++ b/yaml/registry_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import "testing" diff --git a/yaml/secret.go b/yaml/secret.go index d2b1e24..dd0b212 100644 --- a/yaml/secret.go +++ b/yaml/secret.go @@ -1,3 +1,17 @@ +// 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. + package yaml import "errors" diff --git a/yaml/secret_test.go b/yaml/secret_test.go index dfb00aa..3daa129 100644 --- a/yaml/secret_test.go +++ b/yaml/secret_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import ( diff --git a/yaml/signature.go b/yaml/signature.go index 90d3265..5491fb1 100644 --- a/yaml/signature.go +++ b/yaml/signature.go @@ -1,3 +1,17 @@ +// 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. + package yaml import "errors" diff --git a/yaml/signature_test.go b/yaml/signature_test.go index 3455fdc..878ccdc 100644 --- a/yaml/signature_test.go +++ b/yaml/signature_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import "testing" diff --git a/yaml/unit.go b/yaml/unit.go index f55e17b..cdb4a37 100644 --- a/yaml/unit.go +++ b/yaml/unit.go @@ -1,3 +1,17 @@ +// 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. + package yaml import ( diff --git a/yaml/unit_test.go b/yaml/unit_test.go index 566691f..94200a2 100644 --- a/yaml/unit_test.go +++ b/yaml/unit_test.go @@ -1,3 +1,7 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Drone Community +// License that can be found in the LICENSE file. + package yaml import (