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

misc: rename binaries to Alloy #65

Merged
merged 1 commit into from
Mar 25, 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
56 changes: 28 additions & 28 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,21 @@ trigger:
type: docker
---
kind: pipeline
name: Check Linux container (grafana/agent)
name: Check Linux container (grafana/alloy)
platform:
arch: amd64
os: linux
steps:
- commands:
- make agent-image
- make alloy-image
image: grafana/agent-build-image:0.40.2
name: Build container
volumes:
- name: docker
path: /var/run/docker.sock
trigger:
paths:
- cmd/grafana-agent/Dockerfile
- cmd/alloy/Dockerfile
- tools/ci/docker-containers
ref:
- refs/heads/main
Expand All @@ -94,22 +94,22 @@ volumes:
name: docker
---
kind: pipeline
name: Check Windows container (grafana/agent)
name: Check Windows container (grafana/alloy)
platform:
arch: amd64
os: windows
version: "1809"
steps:
- commands:
- '& "C:/Program Files/git/bin/bash.exe" ./tools/ci/docker-containers-windows agent'
- '& "C:/Program Files/git/bin/bash.exe" ./tools/ci/docker-containers-windows alloy'
image: grafana/agent-build-image:0.40.2-windows
name: Build container
volumes:
- name: docker
path: //./pipe/docker_engine/
trigger:
paths:
- cmd/grafana-agent/Dockerfile.windows
- cmd/alloy/Dockerfile.windows
- tools/ci/docker-containers-windows
ref:
- refs/heads/main
Expand All @@ -120,15 +120,15 @@ volumes:
name: docker
---
kind: pipeline
name: Build agent (Linux amd64)
name: Build alloy (Linux amd64)
platform:
arch: amd64
os: linux
steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM=
make agent
make alloy
image: grafana/agent-build-image:0.40.2
name: Build
trigger:
Expand All @@ -137,15 +137,15 @@ trigger:
type: docker
---
kind: pipeline
name: Build agent (Linux arm64)
name: Build alloy (Linux arm64)
platform:
arch: amd64
os: linux
steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM=
make agent
make alloy
image: grafana/agent-build-image:0.40.2
name: Build
trigger:
Expand All @@ -154,15 +154,15 @@ trigger:
type: docker
---
kind: pipeline
name: Build agent (Linux ppc64le)
name: Build alloy (Linux ppc64le)
platform:
arch: amd64
os: linux
steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM=
make agent
make alloy
image: grafana/agent-build-image:0.40.2
name: Build
trigger:
Expand All @@ -171,15 +171,15 @@ trigger:
type: docker
---
kind: pipeline
name: Build agent (Linux s390x)
name: Build alloy (Linux s390x)
platform:
arch: amd64
os: linux
steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM=
make agent
make alloy
image: grafana/agent-build-image:0.40.2
name: Build
trigger:
Expand All @@ -188,14 +188,14 @@ trigger:
type: docker
---
kind: pipeline
name: Build agent (macOS Intel)
name: Build alloy (macOS Intel)
platform:
arch: amd64
os: linux
steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make agent
- GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make alloy
image: grafana/agent-build-image:0.40.2
name: Build
trigger:
Expand All @@ -204,14 +204,14 @@ trigger:
type: docker
---
kind: pipeline
name: Build agent (macOS Apple Silicon)
name: Build alloy (macOS Apple Silicon)
platform:
arch: amd64
os: linux
steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make agent
- GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make alloy
image: grafana/agent-build-image:0.40.2
name: Build
trigger:
Expand All @@ -220,14 +220,14 @@ trigger:
type: docker
---
kind: pipeline
name: Build agent (Windows amd64)
name: Build alloy (Windows amd64)
platform:
arch: amd64
os: linux
steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make agent
- GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make alloy
image: grafana/agent-build-image:0.40.2
name: Build
trigger:
Expand All @@ -236,14 +236,14 @@ trigger:
type: docker
---
kind: pipeline
name: Build agent (FreeBSD amd64)
name: Build alloy (FreeBSD amd64)
platform:
arch: amd64
os: linux
steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make agent
- GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make alloy
image: grafana/agent-build-image:0.40.2
name: Build
trigger:
Expand All @@ -252,7 +252,7 @@ trigger:
type: docker
---
kind: pipeline
name: Publish development Linux agent container
name: Publish development Linux alloy container
platform:
arch: amd64
os: linux
Expand All @@ -269,10 +269,10 @@ steps:
- mkdir -p $HOME/.docker
- printenv GCR_CREDS > $HOME/.docker/config.json
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- docker buildx create --name multiarch-agent-agent-${DRONE_COMMIT_SHA} --driver
- docker buildx create --name multiarch-alloy-alloy-${DRONE_COMMIT_SHA} --driver
docker-container --use
- DEVELOPMENT=1 ./tools/ci/docker-containers agent
- docker buildx rm multiarch-agent-agent-${DRONE_COMMIT_SHA}
- DEVELOPMENT=1 ./tools/ci/docker-containers alloy
- docker buildx rm multiarch-alloy-alloy-${DRONE_COMMIT_SHA}
environment:
DOCKER_LOGIN:
from_secret: docker_login
Expand Down Expand Up @@ -301,7 +301,7 @@ platform:
os: linux
steps:
- commands:
- DOCKER_OPTS="" make dist/grafana-agent-linux-amd64
- DOCKER_OPTS="" make dist/alloy-linux-amd64
- DOCKER_OPTS="" make test-packages
image: grafana/agent-build-image:0.40.2
name: Test Linux system packages
Expand Down Expand Up @@ -399,6 +399,6 @@ kind: secret
name: updater_private_key
---
kind: signature
hmac: 2088d828b5aeec4f38008f932b1402a03745e941ba06c6c4d72a96d42dfb7f01
hmac: ba4497becf94a0f6f8dead2d99f8636683fbfba81eb869723c0a71ce4f7dcc09

...
4 changes: 2 additions & 2 deletions .drone/pipelines/check_containers.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ local build_image = import '../util/build_image.jsonnet';
local pipelines = import '../util/pipelines.jsonnet';

local linux_containers = [
{ name: 'grafana/agent', make: 'make agent-image', path: 'cmd/grafana-agent/Dockerfile' },
{ name: 'grafana/alloy', make: 'make alloy-image', path: 'cmd/alloy/Dockerfile' },
];

local windows_containers = [
{ name: 'grafana/agent', argument: 'agent', path: 'cmd/grafana-agent/Dockerfile.windows' },
{ name: 'grafana/alloy', argument: 'alloy', path: 'cmd/alloy/Dockerfile.windows' },
];

(
Expand Down
2 changes: 1 addition & 1 deletion .drone/pipelines/crosscompile.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ local os_arch_tuples = [


local targets = [
'agent',
'alloy',
];

local build_environments(targets, tuples, image) = std.flatMap(function(target) (
Expand Down
10 changes: 5 additions & 5 deletions .drone/pipelines/publish.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local ghTokenFilename = '/drone/src/gh-token.txt';
// job_names gets the list of job names for use in depends_on.
local job_names = function(jobs) std.map(function(job) job.name, jobs);

local linux_containers = ['agent'];
local linux_containers = ['alloy'];

local linux_containers_dev_jobs = std.map(function(container) (
pipelines.linux('Publish development Linux %s container' % container) {
Expand Down Expand Up @@ -46,11 +46,11 @@ local linux_containers_dev_jobs = std.map(function(container) (
'docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD',

// Create a buildx worker for our cross platform builds.
'docker buildx create --name multiarch-agent-%s-${DRONE_COMMIT_SHA} --driver docker-container --use' % container,
'docker buildx create --name multiarch-alloy-%s-${DRONE_COMMIT_SHA} --driver docker-container --use' % container,

'DEVELOPMENT=1 ./tools/ci/docker-containers %s' % container,

'docker buildx rm multiarch-agent-%s-${DRONE_COMMIT_SHA}' % container,
'docker buildx rm multiarch-alloy-%s-${DRONE_COMMIT_SHA}' % container,
],
}],
volumes: [{
Expand Down Expand Up @@ -100,11 +100,11 @@ local linux_containers_jobs = std.map(function(container) (
'docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD',

// Create a buildx worker for our cross platform builds.
'docker buildx create --name multiarch-agent-%s-${DRONE_COMMIT_SHA} --driver docker-container --use' % container,
'docker buildx create --name multiarch-alloy-%s-${DRONE_COMMIT_SHA} --driver docker-container --use' % container,

'./tools/ci/docker-containers %s' % container,

'docker buildx rm multiarch-agent-%s-${DRONE_COMMIT_SHA}' % container,
'docker buildx rm multiarch-alloy-%s-${DRONE_COMMIT_SHA}' % container,
],
}],
volumes: [{
Expand Down
2 changes: 1 addition & 1 deletion .drone/pipelines/test_packages.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ local pipelines = import '../util/pipelines.jsonnet';
path: '/var/run/docker.sock',
}],
commands: [
'DOCKER_OPTS="" make dist/grafana-agent-linux-amd64',
'DOCKER_OPTS="" make dist/alloy-linux-amd64',
'DOCKER_OPTS="" make test-packages',
],
}],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: "Build technical documentation"
run: >
docker run
--volume "${PWD}/docs/sources:/hugo/content/docs/agent/latest"
--volume "${PWD}/docs/sources:/hugo/content/docs/alloy/latest"
--env HUGO_REFLINKSERRORLEVEL=ERROR
--rm grafana/docs-base:latest
/bin/bash -c 'echo -e "---\\nredirectURL: /docs/agent/latest/\\ntype: redirect\\nversioned: true\\n---\\n" > /hugo/content/docs/agent/_index.md && make hugo'
/bin/bash -c 'echo -e "---\\nredirectURL: /docs/alloy/latest/\\ntype: redirect\\nversioned: true\\n---\\n" > /hugo/content/docs/alloy/_index.md && make hugo'
8 changes: 4 additions & 4 deletions .github/workflows/publish-documentation-next.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:
- name: "Build technical documentation"
run: >
docker run
--volume "${PWD}/docs/sources:/hugo/content/docs/agent/latest"
--volume "${PWD}/docs/sources:/hugo/content/docs/alloy/latest"
--env HUGO_REFLINKSERRORLEVEL=ERROR
--rm grafana/docs-base:latest
/bin/bash -c 'echo -e "---\\nredirectURL: /docs/agent/latest/\\ntype: redirect\\nversioned: true\\n---\\n" > /hugo/content/docs/agent/_index.md && make hugo'
/bin/bash -c 'echo -e "---\\nredirectURL: /docs/alloy/latest/\\ntype: redirect\\nversioned: true\\n---\\n" > /hugo/content/docs/alloy/_index.md && make hugo'

sync:
runs-on: ubuntu-latest
needs: test
steps:

- name: "Checkout Agent repo"
- name: "Checkout Alloy repo"
uses: actions/checkout@v4

- name: "Clone website-sync Action"
Expand All @@ -50,7 +50,7 @@ jobs:
# The IT helpdesk can update the organization secret.
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
source_folder: docs/sources
target_folder: 'content/docs/agent/next'
target_folder: 'content/docs/alloy/next'
allow_no_changes: true
- shell: bash
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
- name: "Build technical documentation"
run: >
docker run
--volume "${PWD}/docs/sources:/hugo/content/docs/agent/latest"
--volume "${PWD}/docs/sources:/hugo/content/docs/alloy/latest"
--env HUGO_REFLINKSERRORLEVEL=ERROR
--rm grafana/docs-base:latest
/bin/bash -c 'echo -e "---\\nredirectURL: /docs/agent/latest/\\ntype: redirect\\nversioned: true\\n---\\n" > /hugo/content/docs/agent/_index.md && make hugo'
/bin/bash -c 'echo -e "---\\nredirectURL: /docs/alloy/latest/\\ntype: redirect\\nversioned: true\\n---\\n" > /hugo/content/docs/alloy/_index.md && make hugo'

sync:
runs-on: ubuntu-latest
needs: test
steps:

- name: "Checkout Agent repo"
- name: "Checkout Alloy repo"
uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
# The IT helpdesk can update the organization secret.
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
source_folder: docs/sources
target_folder: 'content/docs/agent/${{ steps.target.outputs.target }}'
target_folder: 'content/docs/alloy/${{ steps.target.outputs.target }}'
allow_no_changes: true
- shell: bash
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@062f2592684a31eb3aa050cc61e7ca1451cecd3d
with:
image-ref: 'grafana/agent:main'
image-ref: 'grafana/alloy:main'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
Expand All @@ -37,4 +37,4 @@ jobs:
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
sarif_file: 'trivy-results.sarif'
2 changes: 1 addition & 1 deletion .github/workflows/update-make-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
main:
if: github.repository == 'grafana/agent'
if: github.repository == 'grafana/alloy'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
Loading
Loading