Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Die, Bootstrap, die: Rename package bootstrap -> job #2187

Merged
merged 2 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/job_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"time"

"github.com/buildkite/agent/v3/api"
"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/experiments"
"github.com/buildkite/agent/v3/hook"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/agent/v3/kubernetes"
"github.com/buildkite/agent/v3/logger"
"github.com/buildkite/agent/v3/metrics"
Expand Down
2 changes: 1 addition & 1 deletion clicommand/agent_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (

"github.com/buildkite/agent/v3/agent"
"github.com/buildkite/agent/v3/api"
"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/cliconfig"
"github.com/buildkite/agent/v3/experiments"
"github.com/buildkite/agent/v3/hook"
"github.com/buildkite/agent/v3/internal/agentapi"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/agent/v3/internal/utils"
"github.com/buildkite/agent/v3/logger"
"github.com/buildkite/agent/v3/metrics"
Expand Down
4 changes: 2 additions & 2 deletions clicommand/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"sync"
"syscall"

"github.com/buildkite/agent/v3/bootstrap"
"github.com/buildkite/agent/v3/cliconfig"
"github.com/buildkite/agent/v3/experiments"
"github.com/buildkite/agent/v3/internal/job"
"github.com/buildkite/agent/v3/process"
"github.com/urfave/cli"
)
Expand Down Expand Up @@ -411,7 +411,7 @@ var BootstrapCommand = cli.Command{
}

// Configure the bootstraper
bootstrap := bootstrap.New(bootstrap.Config{
bootstrap := job.New(job.Config{
AgentName: cfg.AgentName,
ArtifactUploadDestination: cfg.ArtifactUploadDestination,
AutomaticArtifactUploadPaths: cfg.AutomaticArtifactUploadPaths,
Expand Down
2 changes: 1 addition & 1 deletion clicommand/pipeline_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

"github.com/buildkite/agent/v3/agent"
"github.com/buildkite/agent/v3/api"
"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/cliconfig"
"github.com/buildkite/agent/v3/env"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/agent/v3/internal/pipeline"
"github.com/buildkite/agent/v3/internal/redactor"
"github.com/buildkite/agent/v3/internal/stdin"
Expand Down
2 changes: 1 addition & 1 deletion hook/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"path/filepath"
"runtime"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/agent/v3/internal/utils"
)

Expand Down
2 changes: 1 addition & 1 deletion hook/scriptwrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"text/template"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/env"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/agent/v3/internal/shellscript"
"github.com/buildkite/agent/v3/internal/utils"
)
Expand Down
2 changes: 1 addition & 1 deletion hook/scriptwrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"strings"
"testing"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/env"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/bintest/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/api.go → internal/job/api.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bootstrap
package job

import (
"fmt"
Expand Down
6 changes: 3 additions & 3 deletions bootstrap/bootstrap.go → internal/job/bootstrap.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Package bootstrap provides management of the phases of execution of a
// package job provides management of the phases of execution of a
// Buildkite job.
//
// It is intended for internal use by buildkite-agent only.
package bootstrap
package job

import (
"context"
Expand All @@ -19,10 +19,10 @@ import (
"time"

"github.com/buildkite/agent/v3/agent/plugin"
"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/env"
"github.com/buildkite/agent/v3/experiments"
"github.com/buildkite/agent/v3/hook"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/agent/v3/internal/redactor"
"github.com/buildkite/agent/v3/internal/shellscript"
"github.com/buildkite/agent/v3/internal/utils"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package bootstrap
package job

import (
"context"
"testing"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/agent/v3/internal/redactor"
"github.com/buildkite/agent/v3/tracetools"
"github.com/google/go-cmp/cmp"
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/config.go → internal/job/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bootstrap
package job

import (
"reflect"
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/config_test.go → internal/job/config_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bootstrap
package job

import (
"testing"
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/docker.go → internal/job/docker.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package bootstrap
package job

import (
"context"
"errors"
"fmt"
"strings"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
)

var dockerEnv = []string{
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/git.go → internal/job/git.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bootstrap
package job

import (
"bufio"
Expand All @@ -12,7 +12,7 @@ import (
"regexp"
"strings"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/shellwords"
)

Expand Down
4 changes: 2 additions & 2 deletions bootstrap/git_test.go → internal/job/git_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package bootstrap
package job

import (
"context"
"errors"
"os"
"testing"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"testing"
"time"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/experiments"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/bintest/v3"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"testing"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/bintest/v3"
)

Expand Down
4 changes: 2 additions & 2 deletions bootstrap/knownhosts.go → internal/job/knownhosts.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bootstrap
package job

import (
"bufio"
Expand All @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
homedir "github.com/mitchellh/go-homedir"
"golang.org/x/crypto/ssh/knownhosts"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bootstrap
package job

import (
"context"
Expand All @@ -7,7 +7,7 @@ import (
"os"
"testing"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/gliderlabs/ssh"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"runtime"
"testing"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/google/go-cmp/cmp"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"testing"
"time"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/bintest/v3"
"github.com/google/go-cmp/cmp"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions bootstrap/ssh.go → internal/job/ssh.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bootstrap
package job

import (
"context"
Expand All @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/roko"
)

Expand Down
4 changes: 2 additions & 2 deletions bootstrap/ssh_test.go → internal/job/ssh_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package bootstrap
package job

import (
"context"
"path/filepath"
"testing"
"time"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/bintest/v3"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/tracing.go → internal/job/tracing.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bootstrap
package job

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion internal/redactor/redactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path"
"sync"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/internal/job/shell"
)

// RedactLengthMin is the shortest string length that will be considered a
Expand Down
2 changes: 1 addition & 1 deletion jobapi/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sync"
"time"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/env"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/agent/v3/internal/socket"
)

Expand Down
2 changes: 1 addition & 1 deletion jobapi/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"testing"
"time"

"github.com/buildkite/agent/v3/bootstrap/shell"
"github.com/buildkite/agent/v3/env"
"github.com/buildkite/agent/v3/internal/job/shell"
"github.com/buildkite/agent/v3/jobapi"
"github.com/google/go-cmp/cmp"
)
Expand Down