Skip to content

Commit

Permalink
Merge pull request #1362 from rfratto/dev.frontend-receiver-merge-main
Browse files Browse the repository at this point in the history
Merge main into dev.frontend-receiver
  • Loading branch information
rfratto committed Feb 5, 2022
2 parents 198b39c + b59dab8 commit 9c22907
Show file tree
Hide file tree
Showing 138 changed files with 4,771 additions and 3,530 deletions.
91 changes: 36 additions & 55 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ trigger:

steps:
- name: lint
image: golangci/golangci-lint:v1.37.1
image: golangci/golangci-lint:v1.43
commands:
- apt-get update -y && apt-get install -y libsystemd-dev
- make lint
Expand All @@ -41,61 +41,27 @@ trigger:
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 cmd/agent/agent cmd/agentctl/agentctl cmd/agent-operator/agent-operator cmd/grafana-agent-crow/grafana-agent-crow
- make DRONE=true BUILD_IN_CONTAINER=false test
depends_on:
- Lint

---
kind: pipeline
type: docker
name: E2E
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.43.0
commands:
- make DRONE=true e2e/lint
- name: test
image: docker
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- apk update && apk add make gcc libc-dev bash wget git
- apt-get update && apt-get install -y rubygems rpm nsis apt-transport-https ca-certificates curl gnupg lsb-release
- gem install --no-document fpm
- rm -r /usr/local/go
- mkdir -p /usr/local/go/bin
- wget -q https://golang.org/dl/go1.17.5.linux-amd64.tar.gz
- tar -C /usr/local -xzf go1.17.5.linux-amd64.tar.gz
- rm go1.17.5.linux-amd64.tar.gz
- wget -q https://golang.org/dl/go1.17.6.linux-amd64.tar.gz
- tar -C /usr/local -xzf go1.17.6.linux-amd64.tar.gz
- rm go1.17.6.linux-amd64.tar.gz
- export PATH=$PATH:/usr/local/go/bin
- make E2E_K8S_USE_DOCKER_NETWORK=1 DRONE=true e2e/test

- make cmd/agent/agent cmd/agentctl/agentctl cmd/agent-operator/agent-operator tools/crow/grafana-agent-crow tools/smoke/grafana-agent-smoke
- make K8S_USE_DOCKER_NETWORK=1 DRONE=true BUILD_IN_CONTAINER=false test
depends_on:
- Test
- Lint

volumes:
- name: docker
host:
path: /var/run/docker.sock
- name: docker
host:
path: /var/run/docker.sock

---
kind: pipeline
Expand All @@ -114,15 +80,15 @@ steps:
commands:
- apt-get update && apt-get install -y rubygems rpm nsis
- gem install --no-document fpm
- rm -r /usr/local/go
- 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
- wget -q https://golang.org/dl/go1.17.6.linux-amd64.tar.gz
- tar -C /usr/local -xzf go1.17.6.linux-amd64.tar.gz
- rm go1.17.6.linux-amd64.tar.gz
- export PATH=$PATH:/usr/local/go/bin
- make DRONE=true BUILD_IN_CONTAINER=false dist
depends_on:
- Test
- E2E
---
kind: pipeline
type: docker
Expand All @@ -147,7 +113,11 @@ steps:
from_secret: DOCKER_LOGIN
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
GCR_CREDS:
from_secret: gcr_admin
commands:
- mkdir -p $HOME/.docker
- printenv GCR_CREDS > $HOME/.docker/config.json
- 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
Expand All @@ -157,10 +127,12 @@ steps:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name multiarch --driver docker-container --use
- export RELEASE_TAG=${DRONE_TAG}
- export IMAGE_BRANCH_TAG=${DRONE_BRANCH}
- make DRONE=true CROSS_BUILD=true BUILD_IN_CONTAINER=true RELEASE_BUILD=true agent-image
- make DRONE=true CROSS_BUILD=true BUILD_IN_CONTAINER=true RELEASE_BUILD=true agentctl-image
- make DRONE=true CROSS_BUILD=true BUILD_IN_CONTAINER=true RELEASE_BUILD=true agent-operator-image
- make DRONE=true CROSS_BUILD=true BUILD_IN_CONTAINER=true RELEASE_BUILD=true grafana-agent-crow-image
- make DRONE=true CROSS_BUILD=true BUILD_IN_CONTAINER=true RELEASE_BUILD=true agent-smoke-image
- docker buildx rm multiarch

depends_on:
Expand Down Expand Up @@ -251,10 +223,11 @@ steps:
- apt-get update && apt-get install -y rubygems rpm nsis docker-ce docker-ce-cli containerd.io gettext
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- gem install --no-document fpm
- rm -r /usr/local/go
- 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
- wget -q https://golang.org/dl/go1.17.6.linux-amd64.tar.gz
- tar -C /usr/local -xzf go1.17.6.linux-amd64.tar.gz
- rm go1.17.6.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"
Expand All @@ -275,6 +248,14 @@ get:
path: secret/data/common/gcr
name: .dockerconfigjson

---
kind: secret
name: gcr_admin

get:
name: .dockerconfigjson
path: infra/data/ci/gcr-admin

---
kind: secret
name: gh_token
Expand All @@ -284,6 +265,6 @@ get:
name: pat
---
kind: signature
hmac: d78c4fe3269f5e585d410571767e05b225971aeeb8956cef158f8c701ed828f7
hmac: f59c8b25058782d021a2d6bdc1fc59a049f3b352fb41de6a14c28fd05f578073

...
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 2
26 changes: 0 additions & 26 deletions .github/stale.yml

This file was deleted.

143 changes: 0 additions & 143 deletions .github/workflows/force_release.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Stale check
on:
workflow_dispatch: {}
schedule:
- cron: '0 0 * * *'
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
with:
days-before-stale: 30
days-before-close: 7
stale-issue-message: >
This issue has been automatically marked as stale because it has
not had any activity in the past 30 days.
The next time this stale check runs, the stale label will be
removed if there is new activity. The issue will be closed in 7
days if there is no new activity.
Thank you for your contributions!
stale-pr-message: >
This PR has been automatically marked as stale because it has not
had any activity in the past 30 days.
The next time this stale check runs, the stale label will be
removed if there is new activity. The issue will be closed in 7
days if there is no new activity.
Thank you for your contributions!
stale-issue-label: stale
stale-pr-label: stale
exempt-issue-labels: keepalive,proposal,outdated-dependency,dev-branch
exempt-pr-labels: keepalive,proposal,outdated-dependency,dev-branch
Loading

0 comments on commit 9c22907

Please sign in to comment.