mirror of
https://github.com/grafana/grafana.git
synced 2025-01-02 12:17:01 -06:00
CircleCI: Replace machine executors (#23151)
* CircleCI: Get rid of machine executors * CircleCI: Use new Circle images * CircleCI: Tweak dependency graph
This commit is contained in:
parent
366aa6b5d5
commit
c344e1f6b2
@ -24,18 +24,21 @@ aliases:
|
||||
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
|
||||
|
||||
executors:
|
||||
base:
|
||||
docker:
|
||||
- image: cimg/base:stable
|
||||
node:
|
||||
docker:
|
||||
- image: cimg/node:12.16
|
||||
go:
|
||||
docker:
|
||||
- image: cimg/go:1.14
|
||||
grafana-build:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.13
|
||||
grafana-publish:
|
||||
docker:
|
||||
- image: grafana/grafana-ci-deploy:1.2.4
|
||||
docker:
|
||||
machine:
|
||||
image: circleci/classic:201808-01
|
||||
cloud-sdk:
|
||||
docker:
|
||||
- image: google/cloud-sdk
|
||||
windows-installer:
|
||||
docker:
|
||||
- image: grafana/wix-toolset-ci:v3
|
||||
@ -56,12 +59,12 @@ commands:
|
||||
jobs:
|
||||
install-grabpl:
|
||||
description: Install the Grafana Build Pipeline tool
|
||||
executor: grafana-build
|
||||
executor: base
|
||||
steps:
|
||||
- run:
|
||||
name: Install Grafana Build Pipeline
|
||||
command: |
|
||||
curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.2.7/grabpl
|
||||
curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.2.8/grabpl
|
||||
chmod +x grabpl
|
||||
mkdir bin
|
||||
mv grabpl bin/
|
||||
@ -184,7 +187,7 @@ jobs:
|
||||
|
||||
build-release-publisher:
|
||||
description: "Build release-publisher"
|
||||
executor: grafana-build
|
||||
executor: go
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
@ -210,7 +213,7 @@ jobs:
|
||||
when: on_success
|
||||
|
||||
shellcheck:
|
||||
machine: true
|
||||
executor: base
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace
|
||||
@ -218,9 +221,14 @@ jobs:
|
||||
- run:
|
||||
name: CI job started
|
||||
command: ./scripts/ci-job-started.sh
|
||||
- run:
|
||||
name: Install ShellCheck
|
||||
command: |
|
||||
sudo apt-get update && sudo apt-get install -y shellcheck
|
||||
- run:
|
||||
name: ShellCheck
|
||||
command: /tmp/workspace/bin/grabpl shellcheck
|
||||
command: |
|
||||
/tmp/workspace/bin/grabpl shellcheck
|
||||
- run:
|
||||
name: CI job failed
|
||||
command: ./scripts/ci-job-failed.sh
|
||||
@ -560,7 +568,7 @@ jobs:
|
||||
type: string
|
||||
ubuntu:
|
||||
type: boolean
|
||||
executor: docker
|
||||
executor: base
|
||||
steps:
|
||||
- run:
|
||||
name: Exit if enterprise and forked PR
|
||||
@ -575,6 +583,7 @@ jobs:
|
||||
- run:
|
||||
name: CI job started
|
||||
command: ./scripts/ci-job-started.sh
|
||||
- setup_remote_docker
|
||||
- install-google-cloud-sdk
|
||||
- run:
|
||||
name: Download packages from GCS
|
||||
@ -586,7 +595,6 @@ jobs:
|
||||
./google-cloud-sdk/bin/gcloud auth activate-service-account --key-file=/tmp/gcpkey.json
|
||||
mkdir dist
|
||||
./google-cloud-sdk/bin/gsutil -m rsync -d -r gs://grafana-build-pipeline/<< parameters.edition >>/packages/${CIRCLE_WORKFLOW_ID}/ dist/
|
||||
- run: docker info
|
||||
# XXX: Is this necessary?
|
||||
- run: docker run --privileged linuxkit/binfmt:v0.6
|
||||
- run:
|
||||
@ -677,14 +685,13 @@ jobs:
|
||||
|
||||
mysql-integration-test:
|
||||
docker:
|
||||
- image: circleci/golang:1.13.4
|
||||
- image: cimg/go:1.14
|
||||
- image: circleci/mysql:5.6-ram
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: grafana_tests
|
||||
MYSQL_USER: grafana
|
||||
MYSQL_PASSWORD: password
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
@ -708,13 +715,12 @@ jobs:
|
||||
|
||||
postgres-integration-test:
|
||||
docker:
|
||||
- image: circleci/golang:1.13.4
|
||||
- image: cimg/go:1.14
|
||||
- image: circleci/postgres:9.3-ram
|
||||
environment:
|
||||
POSTGRES_USER: grafanatest
|
||||
POSTGRES_PASSWORD: grafanatest
|
||||
POSTGRES_DB: grafanatest
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
@ -738,12 +744,12 @@ jobs:
|
||||
|
||||
codespell:
|
||||
docker:
|
||||
- image: circleci/python
|
||||
- image: cimg/python:3.8
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: install codespell
|
||||
command: "sudo pip install codespell"
|
||||
name: Install codespell
|
||||
command: "pip install codespell"
|
||||
- run:
|
||||
# Important: all words have to be in lowercase, and separated by "\n".
|
||||
name: exclude known exceptions
|
||||
@ -753,9 +759,7 @@ jobs:
|
||||
command: "codespell -I ./words_to_ignore.txt docs/"
|
||||
|
||||
lint-go:
|
||||
docker:
|
||||
- image: circleci/golang:1.13.4
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
executor: go
|
||||
environment:
|
||||
# we need CGO because of go-sqlite3
|
||||
CGO_ENABLED: 1
|
||||
@ -788,8 +792,7 @@ jobs:
|
||||
-conf=./scripts/go/configs/gosec.json ./pkg/...
|
||||
|
||||
test-frontend:
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
executor: node
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
@ -823,9 +826,7 @@ jobs:
|
||||
when: on_success
|
||||
|
||||
test-backend:
|
||||
docker:
|
||||
- image: circleci/golang:1.13.4
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
executor: go
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
@ -879,7 +880,7 @@ jobs:
|
||||
|
||||
deploy-to-kubernetes:
|
||||
description: "Deploy Grafana master Docker image to Kubernetes"
|
||||
executor: grafana-build
|
||||
executor: base
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace
|
||||
@ -889,8 +890,7 @@ jobs:
|
||||
/tmp/workspace/bin/grabpl deploy-to-k8s $CIRCLE_WORKFLOW_ID
|
||||
|
||||
release-packages:
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
executor: node
|
||||
steps:
|
||||
- run:
|
||||
name: Exit if forked PR
|
||||
@ -1192,8 +1192,6 @@ workflows:
|
||||
- test-frontend
|
||||
- codespell
|
||||
- shellcheck
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- package-enterprise:
|
||||
# No filters, meaning this job runs for all branches
|
||||
requires:
|
||||
@ -1212,8 +1210,6 @@ workflows:
|
||||
- test-frontend
|
||||
- codespell
|
||||
- shellcheck
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- build-oss-windows-installer:
|
||||
# No filters, meaning this job runs for all branches
|
||||
requires:
|
||||
@ -1230,6 +1226,8 @@ workflows:
|
||||
filters: *filter-only-release
|
||||
requires:
|
||||
- end-to-end-tests
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- publish-packages:
|
||||
filters: *filter-master-or-release
|
||||
name: publish-oss-packages
|
||||
@ -1238,6 +1236,8 @@ workflows:
|
||||
- package-oss
|
||||
- build-oss-windows-installer
|
||||
- end-to-end-tests
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- build-release-publisher
|
||||
- publish-packages:
|
||||
filters: *filter-master-or-release
|
||||
@ -1247,6 +1247,8 @@ workflows:
|
||||
- package-enterprise
|
||||
- build-enterprise-windows-installer
|
||||
- end-to-end-tests
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- build-release-publisher
|
||||
- publish-storybook:
|
||||
requires:
|
||||
@ -1259,6 +1261,8 @@ workflows:
|
||||
ubuntu: false
|
||||
requires:
|
||||
- end-to-end-tests
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- package-oss
|
||||
- build-oss-windows-installer
|
||||
- build-docker-images:
|
||||
@ -1268,6 +1272,8 @@ workflows:
|
||||
ubuntu: true
|
||||
requires:
|
||||
- end-to-end-tests
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- package-oss
|
||||
- build-oss-windows-installer
|
||||
- build-docker-images:
|
||||
@ -1277,6 +1283,8 @@ workflows:
|
||||
ubuntu: false
|
||||
requires:
|
||||
- end-to-end-tests
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- package-enterprise
|
||||
- build-enterprise-windows-installer
|
||||
- build-docker-images:
|
||||
@ -1286,6 +1294,8 @@ workflows:
|
||||
ubuntu: true
|
||||
requires:
|
||||
- end-to-end-tests
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- package-enterprise
|
||||
- build-enterprise-windows-installer
|
||||
- end-to-end-tests:
|
||||
|
Loading…
Reference in New Issue
Block a user