This repository was archived by the owner on Jul 28, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 513
Implement Drone Build system, moving away from release via Github Actions #732
Merged
Merged
Changes from all commits
Commits
Show all changes
105 commits
Select commit
Hold shift + click to select a range
713eb5f
Initial drone support
mattdurham b0c03bd
Fix drone file
mattdurham 4f7831b
Drone changes
mattdurham d57c0d9
Added support for drone building
mattdurham 5e4d08e
Echo from makefile
mattdurham 096fe82
Add logging info
mattdurham 5af54bc
Add logging info
mattdurham 025f81a
Add logging info
mattdurham f4cf85c
Add debugging info
mattdurham 244bb51
Add make debugging info
mattdurham f046258
Add seego debugging
mattdurham ba6190b
add ls to see why files arent getting copied
mattdurham 7048075
More debugging
mattdurham 6f781f6
simplify
mattdurham 28b013f
Drone changes
mattdurham a9c683e
Drone v2
mattdurham cb56cfa
Remove invalid files
mattdurham df55cc2
Fix freebsd build
mattdurham 9a79616
Setting up tokens
mattdurham 1f7a85d
Removing windows build output
mattdurham e22211c
Fix for docker builds
mattdurham 995732f
Remove containerize no docker
mattdurham 643bd8c
Make buildx single threaded
mattdurham 9a485d6
Building against personal docker account
mattdurham a4ec0f4
Merge changes
mattdurham 656a89a
Remove exe
mattdurham 71424e9
Removed V6 temporarily to see if fixed
mattdurham f3cc2bc
Removed extra steps
mattdurham 397ab83
Signed yaml
mattdurham 07531e3
Fix makefile
mattdurham 6c48581
Fix tag
mattdurham d8d8e17
Using drone tag
mattdurham fffbf3a
Fix drone tag
mattdurham 014ffb2
Fix drone issues
mattdurham 39a6f6c
Fix docker not being available
mattdurham 2aded66
Set build in container flag
mattdurham 9cd2bb4
fix
mattdurham 2313038
fix
mattdurham b44451b
fix
mattdurham 548d93a
remove dead code
mattdurham aeb1820
comments
mattdurham 525f0f6
sign
mattdurham ce1bfa0
Merge remote-tracking branch 'origin/main' into drone
mattdurham 96e1799
comments
mattdurham d211d6c
comments
mattdurham 1ae2949
comments
mattdurham 73ee17b
comments
mattdurham 36f1e61
comments
mattdurham ae16bf0
comments
mattdurham 2776ba0
comments
mattdurham b2b358d
comments
mattdurham 8495ad8
comments
mattdurham e0f72a2
Update changelog
mattdurham d128597
comments
mattdurham d656dba
test build
mattdurham c82b874
test build
mattdurham a246bf5
test build
mattdurham 4bf2028
test build
mattdurham ed06d3a
test build
mattdurham 9efcada
test build
mattdurham 1728826
test build
mattdurham 2955258
test build
mattdurham 487d9a2
Merge remote-tracking branch 'origin/main' into drone
mattdurham a068161
test build
mattdurham 9dae635
test build
mattdurham a70f516
Cleanup
mattdurham 542aafe
Remove release.key
mattdurham 145e448
Fix for windows installer build
mattdurham aaec782
Allow windows installer builds
mattdurham 15b8d50
Merge branch 'drone' of github.com:grafana/agent into drone
mattdurham 93f0709
Simplify makefile
mattdurham 69bfaf8
Remove unused files
mattdurham a56ccd8
Add test back to github
mattdurham 864647e
Fix normal makes
mattdurham 856634a
Reorder changelog
mattdurham cf2b225
Fix arm64
mattdurham 310f92b
Arm fix
mattdurham b85a25b
Remove comment lines
mattdurham 941c182
rename governance
mattdurham 4909d48
use seego
mattdurham 45363ef
Simplify seego usage
mattdurham c427997
include fix for test
mattdurham a7f35c2
Fix for dout
mattdurham f0f485e
Only build docker container if needed
mattdurham 787e70a
Add depends on
mattdurham cf0d0f4
Fix naming
mattdurham 6c04898
Unsilent any remaining output
mattdurham dd9b894
unsilent
mattdurham d22fbe1
Remove check-seego and switch to using docker by default
mattdurham 36270ac
Change triggers
mattdurham 368be32
rename master to main
mattdurham 3bdf0d6
Fix dependency order now that Dist only triggers on tags
mattdurham c10d86a
Sign drone
mattdurham 891f416
mount local go mod cache to seego if one exists
rfratto d6faab2
Clean up triggers
mattdurham 2ba55dc
Merge branch 'drone' of github.com:grafana/agent into drone
mattdurham 4c4107d
Add trigger to dist
mattdurham 7ab5d4c
testing change for synchronized
mattdurham b4b1e57
testing change for synchronized
mattdurham 552b457
Undo changeS
mattdurham 292281a
sign drone
mattdurham 3c424b6
Prevent double build
mattdurham c445764
remove extra check
mattdurham cc36e4e
deduplicate build
mattdurham 1a779e2
deduplicate build
mattdurham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,176 @@ | ||
| --- | ||
| kind: pipeline | ||
| name: Lint | ||
| platform: | ||
| os: linux | ||
| arch: amd64 | ||
| trigger: | ||
| event: | ||
| - push | ||
| - pull_request | ||
| - tag | ||
| ref: | ||
| - refs/heads/main | ||
| - refs/pull/*/head | ||
| - refs/tags/** | ||
|
|
||
| steps: | ||
| - name: lint | ||
| image: golangci/golangci-lint:v1.37.1 | ||
| commands: | ||
| - apt-get update -y && apt-get install -y libsystemd-dev | ||
| - make lint | ||
|
|
||
| --- | ||
| kind: pipeline | ||
| type: docker | ||
| name: Test | ||
| platform: | ||
| os: linux | ||
| arch: amd64 | ||
| trigger: | ||
| event: | ||
| - push | ||
| - pull_request | ||
| - tag | ||
| ref: | ||
| - refs/heads/main | ||
| - refs/pull/*/head | ||
| - refs/tags/** | ||
|
|
||
| steps: | ||
| - name: test | ||
| image: rfratto/seego | ||
| commands: | ||
| - apt-get update && apt-get install -y rubygems rpm nsis apt-transport-https ca-certificates curl gnupg lsb-release | ||
| - gem install --no-document fpm | ||
| - mkdir -p /usr/local/go/bin | ||
| - wget -q https://golang.org/dl/go1.16.5.linux-amd64.tar.gz | ||
| - tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz | ||
| - rm go1.16.5.linux-amd64.tar.gz | ||
| - export PATH=$PATH:/usr/local/go/bin | ||
| - make DRONE=true BUILD_IN_CONTAINER=false test | ||
| depends_on: | ||
| - Lint | ||
|
|
||
| --- | ||
| kind: pipeline | ||
| type: docker | ||
| name: Dist | ||
| platform: | ||
| os: linux | ||
| arch: amd64 | ||
| trigger: | ||
| ref: | ||
| - refs/tags/v* | ||
|
|
||
| steps: | ||
| - name: distribute | ||
| image: rfratto/seego | ||
| commands: | ||
| - apt-get update && apt-get install -y rubygems rpm nsis | ||
| - gem install --no-document fpm | ||
| - mkdir -p /usr/local/go/bin | ||
| - wget -q https://golang.org/dl/go1.16.5.linux-amd64.tar.gz | ||
| - tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz | ||
| - rm go1.16.5.linux-amd64.tar.gz | ||
| - export PATH=$PATH:/usr/local/go/bin | ||
| - make DRONE=true BUILD_IN_CONTAINER=false RELEASE_TAG=v0.0.0 dist | ||
| depends_on: | ||
| - Test | ||
| --- | ||
| kind: pipeline | ||
| type: docker | ||
| name: Containerize | ||
| platform: | ||
| os: linux | ||
| arch: amd64 | ||
| trigger: | ||
| ref: | ||
| - refs/heads/main | ||
| - refs/tags/v* | ||
|
|
||
| steps: | ||
| - name: Build Containers | ||
| image: docker | ||
| volumes: | ||
| - name: docker | ||
| path: /var/run/docker.sock | ||
| environment: | ||
| DOCKER_LOGIN: | ||
| from_secret: DOCKER_LOGIN | ||
| DOCKER_PASSWORD: | ||
| from_secret: DOCKER_PASSWORD | ||
| commands: | ||
| - docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | ||
| - apk update && apk add make bash wget git qemu | ||
| - wget -q https://github.com/docker/buildx/releases/download/v0.5.1/buildx-v0.5.1.linux-amd64 | ||
| - mkdir -p ~/.docker/cli-plugins | ||
| - cp buildx-v0.5.1.linux-amd64 ~/.docker/cli-plugins/docker-buildx | ||
| - chmod a+x ~/.docker/cli-plugins/docker-buildx | ||
| - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | ||
| - docker buildx create --name multiarch --driver docker-container --use | ||
| - make DRONE=true CROSS_BUILD=true RELEASE_BUILD=true agent-image | ||
| - make DRONE=true CROSS_BUILD=true RELEASE_BUILD=true agentctl-image | ||
| - docker buildx rm multiarch | ||
|
|
||
|
|
||
| depends_on: | ||
| - Lint | ||
|
|
||
| volumes: | ||
| - name: docker | ||
| host: | ||
| path: /var/run/docker.sock | ||
| --- | ||
| kind: pipeline | ||
| type: docker | ||
| name: Release | ||
| platform: | ||
| os: linux | ||
| arch: amd64 | ||
| trigger: | ||
| ref: | ||
| - refs/tags/v* | ||
|
|
||
| steps: | ||
| - name: create-release | ||
| image: rfratto/seego | ||
| volumes: | ||
| - name: docker | ||
| path: /var/run/docker.sock | ||
| environment: | ||
| DOCKER_LOGIN: | ||
| from_secret: DOCKER_LOGIN | ||
| DOCKER_PASSWORD: | ||
| from_secret: DOCKER_PASSWORD | ||
| GITHUB_TOKEN: | ||
| from_secret: GITHUB_KEY | ||
| commands: | ||
| - apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release | ||
| - curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | ||
| - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" | ||
| - apt-get update && apt-get install -y rubygems rpm nsis docker-ce docker-ce-cli containerd.io | ||
| - docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | ||
| - gem install --no-document fpm | ||
| - mkdir -p /usr/local/go/bin | ||
| - wget -q https://golang.org/dl/go1.16.5.linux-amd64.tar.gz | ||
| - tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz | ||
| - rm go1.16.5.linux-amd64.tar.gz | ||
| - export PATH=$PATH:/usr/local/go/bin | ||
| - GO111MODULE=on go get -u github.com/mitchellh/gox github.com/tcnksm/ghr | ||
| - export PATH="$(go env GOPATH)/bin:$PATH" | ||
| - RELEASE_TAG=$DRONE_TAG | ||
| - make -j4 BUILD_IN_CONTAINER=false RELEASE_BUILD=true RELEASE_TAG=$RELEASE_TAG publish | ||
| depends_on: | ||
| - Dist | ||
|
|
||
| volumes: | ||
| - name: docker | ||
| host: | ||
| path: /var/run/docker.sock | ||
| --- | ||
| kind: signature | ||
| hmac: 13ae086c4ff0380f263dc4e3e7289bb82b0130e266cd6763e75cf0e451928225 | ||
|
|
||
| ... | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: since this isn't a Dockerfile we probably don't have to remove the tarball, though it doesn't really matter to me if we leave this in or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its really annoying with drone =) If you run multiple drone instances it created a ton of .gz files that sit around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, gotcha 👍