CI: use cache_from shorthand provided by Docker orb (#1540)
After we wrote our Docker jobs, the cache_from was added to the orb. This is shorter and less error prone because we don't need to provide the identical arguments twice. The change was made in https://github.com/CircleCI-Public/docker-orb/pull/27 by @vsoch. And was released as of v0.5.15 of the Docker orb. The change updates to the latest version of the orb currently available.
This commit is contained in:
parent
41f3803a97
commit
90b77a85dd
|
@ -7,7 +7,7 @@ version: 2.1
|
||||||
|
|
||||||
orbs:
|
orbs:
|
||||||
# https://circleci.com/orbs/registry/orb/circleci/docker
|
# https://circleci.com/orbs/registry/orb/circleci/docker
|
||||||
docker: circleci/docker@0.5.13
|
docker: circleci/docker@0.5.20
|
||||||
|
|
||||||
executors:
|
executors:
|
||||||
node10:
|
node10:
|
||||||
|
@ -38,11 +38,6 @@ commands:
|
||||||
paths:
|
paths:
|
||||||
- node_modules
|
- node_modules
|
||||||
key: v1-node<< parameters.node_version >>-dependencies-{{ checksum "package.json" }}
|
key: v1-node<< parameters.node_version >>-dependencies-{{ checksum "package.json" }}
|
||||||
pull_cache:
|
|
||||||
description: Pulls docker images usable for our cache
|
|
||||||
steps:
|
|
||||||
- run: docker pull sourcecred/sourcecred:dev
|
|
||||||
- run: docker pull node:12
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
@ -81,15 +76,13 @@ workflows:
|
||||||
deploy: false
|
deploy: false
|
||||||
image: sourcecred/sourcecred
|
image: sourcecred/sourcecred
|
||||||
tag: latest
|
tag: latest
|
||||||
|
cache_from: node:12,sourcecred/sourcecred:dev
|
||||||
requires:
|
requires:
|
||||||
- test
|
- test
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
ignore:
|
ignore:
|
||||||
- master
|
- master
|
||||||
extra_build_args: --cache-from=node:12,sourcecred/sourcecred:dev
|
|
||||||
before_build:
|
|
||||||
- pull_cache
|
|
||||||
after_build:
|
after_build:
|
||||||
- run:
|
- run:
|
||||||
name: Preview Docker Tag for Build
|
name: Preview Docker Tag for Build
|
||||||
|
@ -99,9 +92,7 @@ workflows:
|
||||||
|
|
||||||
- docker/publish:
|
- docker/publish:
|
||||||
image: sourcecred/sourcecred
|
image: sourcecred/sourcecred
|
||||||
extra_build_args: --cache-from=node:12,sourcecred/sourcecred:dev
|
cache_from: node:12,sourcecred/sourcecred:dev
|
||||||
before_build:
|
|
||||||
- pull_cache
|
|
||||||
requires:
|
requires:
|
||||||
- test
|
- test
|
||||||
- test_full
|
- test_full
|
||||||
|
@ -136,9 +127,7 @@ workflows:
|
||||||
deploy: false
|
deploy: false
|
||||||
image: sourcecred/sourcecred
|
image: sourcecred/sourcecred
|
||||||
tag: latest
|
tag: latest
|
||||||
extra_build_args: --cache-from=node:12,sourcecred/sourcecred:dev
|
cache_from: node:12,sourcecred/sourcecred:dev
|
||||||
before_build:
|
|
||||||
- pull_cache
|
|
||||||
after_build:
|
after_build:
|
||||||
- run:
|
- run:
|
||||||
name: Publish Docker Tag with Sourcecred Version
|
name: Publish Docker Tag with Sourcecred Version
|
||||||
|
|
Loading…
Reference in New Issue