mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-02 23:36:35 +00:00
@@ -18,8 +18,10 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"maps"
|
||||
"os"
|
||||
"runtime"
|
||||
"slices"
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
@@ -155,6 +157,17 @@ func (e *kube) Load(ctx context.Context) (*types.BackendInfo, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (e *kube) getConfig() *config {
|
||||
if e.config == nil {
|
||||
return nil
|
||||
}
|
||||
c := *e.config
|
||||
c.PodLabels = maps.Clone(e.config.PodLabels)
|
||||
c.PodAnnotations = maps.Clone(e.config.PodLabels)
|
||||
c.ImagePullSecretNames = slices.Clone(e.config.ImagePullSecretNames)
|
||||
return &c
|
||||
}
|
||||
|
||||
// Setup the pipeline environment.
|
||||
func (e *kube) SetupWorkflow(ctx context.Context, conf *types.Config, taskUUID string) error {
|
||||
log.Trace().Str("taskUUID", taskUUID).Msgf("Setting up Kubernetes primitives")
|
||||
|
Reference in New Issue
Block a user