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

sec: Upgrade Ubuntu to latest LTS version #6992

Merged
merged 15 commits into from
Aug 22, 2024
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 .github/workflows/check-linux-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
check-linux-build-image:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: Build
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-latest"
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ internal API changes are not present.
Main (unreleased)
-----------------

### Other changes

- Change the Docker base image for Linux containers to `ubuntu:noble`. (@amontalban)

v0.42.0 (2024-07-24)
-------------------------

Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agent-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} \
make operator

FROM public.ecr.aws/ubuntu/ubuntu:mantic
FROM public.ecr.aws/ubuntu/ubuntu:noble

LABEL org.opencontainers.image.source="https://github.com/grafana/agent"

Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
GOEXPERIMENT=${GOEXPERIMENT} \
make agent

FROM public.ecr.aws/ubuntu/ubuntu:mantic
FROM public.ecr.aws/ubuntu/ubuntu:noble

#Username and uid for grafana-agent user
ARG UID=473
Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agentctl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
GO_TAGS="netgo promtail_journal_enabled" \
make agentctl

FROM public.ecr.aws/ubuntu/ubuntu:mantic
FROM public.ecr.aws/ubuntu/ubuntu:noble

LABEL org.opencontainers.image.source="https://github.com/grafana/agent"

Expand Down
5 changes: 3 additions & 2 deletions internal/cmd/integration-tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func executeCommand(command string, args []string, taskDescription string) {
cmd := exec.Command(command, args...)
var stderr bytes.Buffer
cmd.Stderr = &stderr

if err := cmd.Run(); err != nil {
log.Fatalf("Error: %s\n", stderr.String())
}
Expand All @@ -39,7 +40,7 @@ func buildAgent() {
}

func setupEnvironment() {
executeCommand("docker-compose", []string{"up", "-d"}, "Setting up environment with Docker Compose")
executeCommand("docker", []string{"compose", "up", "-d"}, "Setting up environment with Docker Compose")
fmt.Println("Sleep for 30 seconds to ensure that the env has time to initialize...")
time.Sleep(30 * time.Second)
}
Expand Down Expand Up @@ -114,7 +115,7 @@ func runAllTests() {

func cleanUpEnvironment() {
fmt.Println("Cleaning up Docker environment...")
err := exec.Command("docker-compose", "down", "--volumes", "--rmi", "all").Run()
err := exec.Command("docker", "compose", "down", "--volumes", "--rmi", "all").Run()
if err != nil {
panic(err)
}
Expand Down
Loading