Skip to content

Commit e3be633

Browse files
github-actions[bot]Warashit-kikuc
authored
Cherry-pick to release-v0.52.x (#5911)
* Fix lint errors (#5897) * Fix import grouping by make lint/go FIX=true Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Fix linter errors by make lint/go FIX=true Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Rewrite long if-else to switch Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Remove unnecessary zero-value initialization Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Remove unnecessary string conversion Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Fix to correctly call deferred functions log.Fatalf calls os.Exit(1) and deferred functions are not called. This commit changes the _main function to return an integer and call os.Exit from main. Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Fix lint errors log.Fatal calls os.Exit, so the deferred functions are not called. This commit changes the _main function to return an integer and call os.Exit from main. This is a workaround to fix the lint errors. Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Fix lint errors Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Initialize the slice with the correct capacity Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Change return type of doComment to int Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> --------- Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: pipecd-bot <[email protected]> * Add 'title' to distinguish multiple projects in actions-plan-preview (#5905) * add title to args Signed-off-by: t-kikuc <[email protected]> * Add the title to filter latest comments Signed-off-by: t-kikuc <[email protected]> * Use hash Signed-off-by: t-kikuc <[email protected]> * Fix tests Signed-off-by: t-kikuc <[email protected]> * add multibyte test Signed-off-by: t-kikuc <[email protected]> --------- Signed-off-by: t-kikuc <[email protected]> Signed-off-by: pipecd-bot <[email protected]> * Revert "Do treeless clone for git clone to improve performance (#5722)" (#5908) This reverts commit 7e74937. Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: pipecd-bot <[email protected]> * Cut release v0.52.1 (#5909) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Warashi <[email protected]> Signed-off-by: pipecd-bot <[email protected]> --------- Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: pipecd-bot <[email protected]> Signed-off-by: t-kikuc <[email protected]> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Co-authored-by: Tetsuya KIKUCHI <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Warashi <[email protected]>
1 parent 01f082b commit e3be633

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+299
-118
lines changed

RELEASE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by `make release` command.
22
# DO NOT EDIT.
3-
tag: v0.52.0
3+
tag: v0.52.1
44

55
releaseNoteGenerator:
66
showCommitter: false

pkg/app/pipedv1/plugin/kubernetes/deployment/apply.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ import (
1818
"context"
1919
"errors"
2020

21-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2221
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
22+
23+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2324
)
2425

2526
type applier interface {

pkg/app/pipedv1/plugin/kubernetes/deployment/canary.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ package deployment
1717
import (
1818
"context"
1919

20-
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2120
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
21+
22+
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2223
)
2324

2425
func (p *Plugin) executeK8sCanaryRolloutStage(_ context.Context, input *sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec], _ []*sdk.DeployTarget[kubeconfig.KubernetesDeployTargetConfig]) sdk.StageStatus {

pkg/app/pipedv1/plugin/kubernetes/deployment/determine.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ import (
2121

2222
"go.uber.org/zap"
2323

24-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
25-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2624
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2725
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
26+
27+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
28+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2829
)
2930

3031
type containerImage struct {

pkg/app/pipedv1/plugin/kubernetes/deployment/determine_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ import (
2424
"go.uber.org/zap"
2525
"sigs.k8s.io/yaml"
2626

27+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
28+
2729
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2830
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
29-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
3031
)
3132

3233
func mustUnmarshalYAML[T any](t *testing.T, data []byte) T {

pkg/app/pipedv1/plugin/kubernetes/deployment/misc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ import (
2424
corev1 "k8s.io/api/core/v1"
2525
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2626

27-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2827
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
28+
29+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2930
)
3031

3132
func ensureVariantSelectorInWorkload(m provider.Manifest, variantLabel, variant string) error {

pkg/app/pipedv1/plugin/kubernetes/deployment/plugin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ import (
2020

2121
"go.uber.org/zap"
2222

23+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
24+
2325
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2426
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2527
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
26-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2728
)
2829

2930
// Plugin implements the sdk.DeploymentPlugin interface.

pkg/app/pipedv1/plugin/kubernetes/deployment/primary.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ import (
2121
"fmt"
2222
"time"
2323

24+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
25+
2426
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2527
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2628
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
27-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2829
)
2930

3031
func (p *Plugin) executeK8sPrimaryRolloutStage(ctx context.Context, input *sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec], dts []*sdk.DeployTarget[kubeconfig.KubernetesDeployTargetConfig]) sdk.StageStatus {

pkg/app/pipedv1/plugin/kubernetes/deployment/primary_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ import (
2727
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2828
schema "k8s.io/apimachinery/pkg/runtime/schema"
2929

30-
kubeConfigPkg "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
31-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
3230
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
3331
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
3432
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
33+
34+
kubeConfigPkg "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
35+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
3536
)
3637

3738
func TestPlugin_executeK8sPrimaryRolloutStage(t *testing.T) {

pkg/app/pipedv1/plugin/kubernetes/deployment/rollback.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ import (
1818
"cmp"
1919
"context"
2020

21+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
22+
2123
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2224
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2325
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
24-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2526
)
2627

2728
func (p *Plugin) executeK8sRollbackStage(ctx context.Context, input *sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec], dts []*sdk.DeployTarget[kubeconfig.KubernetesDeployTargetConfig]) sdk.StageStatus {

pkg/app/pipedv1/plugin/kubernetes/deployment/rollback_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ import (
2424
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2525
"k8s.io/apimachinery/pkg/runtime/schema"
2626

27-
kubeConfigPkg "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2827
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2928
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
3029
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
30+
31+
kubeConfigPkg "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
3132
)
3233

3334
func TestPlugin_executeK8sRollbackStage_NoPreviousDeployment(t *testing.T) {

pkg/app/pipedv1/plugin/kubernetes/deployment/sync.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ import (
2020
"encoding/json"
2121
"time"
2222

23+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
24+
2325
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2426
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2527
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
26-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2728
)
2829

2930
func (p *Plugin) executeK8sSyncStage(ctx context.Context, input *sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec], dts []*sdk.DeployTarget[kubeconfig.KubernetesDeployTargetConfig]) sdk.StageStatus {

pkg/app/pipedv1/plugin/kubernetes/deployment/sync_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ import (
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2727
"k8s.io/apimachinery/pkg/runtime/schema"
2828

29-
kubeConfigPkg "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
3029
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
3130
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
3231
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
32+
33+
kubeConfigPkg "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
3334
)
3435

3536
func TestPlugin_executeK8sSyncStage(t *testing.T) {

pkg/app/pipedv1/plugin/kubernetes/deployment/traffic.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ package deployment
1717
import (
1818
"context"
1919

20-
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2120
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
21+
22+
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2223
)
2324

2425
func (p *Plugin) executeK8sTrafficRoutingStage(_ context.Context, input *sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec], _ []*sdk.DeployTarget[kubeconfig.KubernetesDeployTargetConfig]) sdk.StageStatus {

pkg/app/pipedv1/plugin/kubernetes/livestate/plugin.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ import (
2222

2323
"go.uber.org/zap"
2424

25+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
26+
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
27+
2528
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
2629
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2730
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
28-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
29-
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
3031
)
3132

3233
type Plugin struct{}

pkg/app/pipedv1/plugin/kubernetes/livestate/plugin_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
"github.com/stretchr/testify/require"
2222
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
2323

24-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2524
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2625
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
26+
27+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
2728
)
2829

2930
func makeTestManifest(t *testing.T, yaml string) provider.Manifest {

pkg/app/pipedv1/plugin/kubernetes/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ package main
1717
import (
1818
"log"
1919

20+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
21+
2022
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/deployment"
2123
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/livestate"
22-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2324
)
2425

2526
func main() {

pkg/app/pipedv1/plugin/kubernetes/provider/helm_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ import (
2323
"github.com/stretchr/testify/require"
2424
"go.uber.org/zap/zaptest"
2525

26-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
2726
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
27+
28+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
2829
)
2930

3031
func TestTemplateLocalChart(t *testing.T) {

pkg/app/pipedv1/plugin/kubernetes/provider/kustomize_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ import (
2222
"github.com/stretchr/testify/require"
2323
"go.uber.org/zap/zaptest"
2424

25-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
2625
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
26+
27+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
2728
)
2829

2930
func TestKustomizeTemplate(t *testing.T) {

pkg/app/pipedv1/plugin/kubernetes/provider/loader_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ import (
2626
"go.uber.org/zap"
2727
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
2828

29+
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
30+
2931
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
3032
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
31-
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
3233
)
3334

3435
func mustParseManifests(t *testing.T, data string) []Manifest {

pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/apply.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ import (
1818
"context"
1919
"errors"
2020

21-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2221
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
22+
23+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2324
)
2425

2526
type applier interface {

pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/determine.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ import (
2121

2222
"go.uber.org/zap"
2323

24-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
25-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2624
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2725
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
26+
27+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
28+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2829
)
2930

3031
type containerImage struct {

pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/determine_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ import (
2424
"go.uber.org/zap"
2525
"sigs.k8s.io/yaml"
2626

27+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
28+
2729
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
2830
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
29-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
3031
)
3132

3233
func mustUnmarshalYAML[T any](t *testing.T, data []byte) T {

pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/misc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ import (
1818
"context"
1919
"errors"
2020

21-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2221
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
22+
23+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2324
)
2425

2526
func ensureVariantSelectorInWorkload(m provider.Manifest, variantLabel, variant string) error {

pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/plugin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ import (
2020

2121
"go.uber.org/zap"
2222

23+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
24+
2325
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
2426
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2527
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/toolregistry"
26-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2728
)
2829

2930
// Plugin implements the sdk.DeploymentPlugin interface.

pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/rollback.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ import (
1919
"context"
2020
"sync"
2121

22+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
23+
2224
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
2325
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2426
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/toolregistry"
25-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2627
)
2728

2829
func (p *Plugin) executeK8sMultiRollbackStage(ctx context.Context, input *sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec], dts []*sdk.DeployTarget[kubeconfig.KubernetesDeployTargetConfig]) sdk.StageStatus {

pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/rollback_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ import (
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2727
"k8s.io/apimachinery/pkg/runtime/schema"
2828

29-
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
3029
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
3130
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
3231
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
32+
33+
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
3334
)
3435

3536
func TestPlugin_executeK8sMultiRollbackStage_compatibility_k8sPlugin_NoPreviousDeployment(t *testing.T) {

pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/sync.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ import (
2323

2424
"golang.org/x/sync/errgroup"
2525

26+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
27+
2628
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
2729
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2830
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/toolregistry"
29-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
3031
)
3132

3233
func (p *Plugin) executeK8sMultiSyncStage(ctx context.Context, input *sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec], dts []*sdk.DeployTarget[kubeconfig.KubernetesDeployTargetConfig]) sdk.StageStatus {

pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/sync_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ import (
2727
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2828
"k8s.io/apimachinery/pkg/runtime/schema"
2929

30-
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
3130
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
3231
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
3332
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
33+
34+
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
3435
)
3536

3637
func TestPlugin_executeK8sMultiSyncStage(t *testing.T) {

pkg/app/pipedv1/plugin/kubernetes_multicluster/livestate/plugin.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ import (
2222

2323
"go.uber.org/zap"
2424

25+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
26+
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
27+
2528
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
2629
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2730
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/toolregistry"
28-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
29-
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
3031
)
3132

3233
type Plugin struct{}

pkg/app/pipedv1/plugin/kubernetes_multicluster/livestate/plugin_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ import (
2121
"github.com/stretchr/testify/require"
2222
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
2323

24-
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
25-
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2624
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2725
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
26+
27+
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
28+
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
2829
)
2930

3031
func makeTestManifest(t *testing.T, yaml string) provider.Manifest {

pkg/app/pipedv1/plugin/kubernetes_multicluster/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ package main
1717
import (
1818
"log"
1919

20+
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
21+
2022
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment"
2123
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/livestate"
22-
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
2324
)
2425

2526
func main() {

0 commit comments

Comments
 (0)