Skip to content

Commit

Permalink
CI: Update docker images to new cimg type
Browse files Browse the repository at this point in the history
These new images from CircleCI are engineered to have faster spinup times through a smaller footprint and more shared layers with other languages run on CircleCI (means more cache hits!)

They also add stability with more deterministic versioning.

CI: remove sudo and circleci legacy images

replaced more `circleci` with `cimg` alternative. Removed any sudo for affected jobs since those run as root.

CI: fix node version

CI: pin python docker image for codespell

CI:use python 3.6

issue with 2.7 - CircleCI-Public/cimg-python#19
  • Loading branch information
eddiewebb committed Dec 19, 2019
1 parent f33a917 commit 49147b1
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ version: 2
jobs:
mysql-integration-test:
docker:
- image: circleci/golang:1.13.4
- image: cimg/go:1.13.4
- image: circleci/mysql:5.6-ram
environment:
MYSQL_ROOT_PASSWORD: rootpass
Expand All @@ -32,8 +32,8 @@ jobs:
- run:
name: ci job started
command: './scripts/ci-job-started.sh'
- run: sudo apt update
- run: sudo apt install -y default-mysql-client
- run: apt update
- run: apt install -y default-mysql-client
- run: dockerize -wait tcp://127.0.0.1:3306 -timeout 120s
- run: cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h 127.0.0.1 -P 3306 -u root -prootpass
- run:
Expand All @@ -50,7 +50,7 @@ jobs:

postgres-integration-test:
docker:
- image: circleci/golang:1.13.4
- image: cimg/go:1.13.4
- image: circleci/postgres:9.3-ram
environment:
POSTGRES_USER: grafanatest
Expand All @@ -62,8 +62,8 @@ jobs:
- run:
name: ci job started
command: './scripts/ci-job-started.sh'
- run: sudo apt update
- run: sudo apt install -y postgresql-client
- run: apt update
- run: apt install -y postgresql-client
- run: dockerize -wait tcp://127.0.0.1:5432 -timeout 120s
- run: 'PGPASSWORD=grafanatest psql -p 5432 -h 127.0.0.1 -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql'
- run:
Expand All @@ -80,7 +80,7 @@ jobs:

cache-server-test:
docker:
- image: circleci/golang:1.13.4
- image: cimg/go:1.13.4
- image: circleci/redis:4-alpine
- image: memcached
working_directory: /go/src/github.com/grafana/grafana
Expand Down Expand Up @@ -189,12 +189,12 @@ jobs:

codespell:
docker:
- image: circleci/python
- image: cimg/python:3.6
steps:
- checkout
- run:
name: install codespell
command: 'sudo pip install codespell'
command: 'pip install codespell'
- run:
# Important: all words have to be in lowercase, and separated by "\n".
name: exclude known exceptions
Expand All @@ -205,7 +205,7 @@ jobs:

lint-go:
docker:
- image: circleci/golang:1.13.4
- image: cimg/go:1.13.4
environment:
# we need CGO because of go-sqlite3
CGO_ENABLED: 1
Expand All @@ -227,7 +227,7 @@ jobs:

test-frontend:
docker:
- image: circleci/node:12
- image: cimg/node:12.13
steps:
- checkout
- run:
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:

test-backend:
docker:
- image: circleci/golang:1.13.4
- image: cimg/go:1.13.4
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand Down Expand Up @@ -960,7 +960,7 @@ jobs:

store-build-artifacts:
docker:
- image: circleci/node:12
- image: cimg/node:12.13
steps:
- attach_workspace:
at: .
Expand All @@ -969,7 +969,7 @@ jobs:

build-grafana-packages:
docker:
- image: circleci/node:12
- image: cimg/node:12.13
steps:
- checkout
- run:
Expand All @@ -993,7 +993,7 @@ jobs:

release-next-packages:
docker:
- image: circleci/node:12
- image: cimg/node:12.13
steps:
- checkout
- run:
Expand All @@ -1019,7 +1019,7 @@ jobs:

release-packages:
docker:
- image: circleci/node:12
- image: cimg/node:12.13
steps:
- checkout
- run:
Expand All @@ -1045,7 +1045,7 @@ jobs:

scan-docker-master:
docker:
- image: circleci/buildpack-deps:stretch
- image: cimg/base:stable
steps:
- setup_remote_docker
- restore_cache:
Expand All @@ -1061,7 +1061,7 @@ jobs:
wget https://github.com/aquasecurity/trivy/releases/download/v${VERSION}/trivy_${VERSION}_Linux-64bit.tar.gz
tar zxvf trivy_${VERSION}_Linux-64bit.tar.gz
sudo mv trivy /usr/local/bin
mv trivy /usr/local/bin
- run:
name: Scan the latest grafana master image with trivy
command: trivy --exit-code 1 --quiet --auto-refresh --clear-cache grafana/grafana:master
Expand Down

0 comments on commit 49147b1

Please sign in to comment.