CircleCI version 2.1 - “Cannot find a definition for command named 'restore-cache'”2019 Community Moderator ElectionHow to resolve $TERM not set on gradlew ./assembleRelease on CIrcleCI?Rails Precompiling assets for CIcircleci v2 config - how do we filter by owner in a workflow?CircleCI 2.0 Workflow - Deploy not workingRun a command on CircleCI only once for a branchCircleCI migration: Config fileCircleci runs on merged branchCircleCI API behaving differently from github commit trigger?Errors in CircleCI config.ymlCircleCI error your tests likely make requests to this 'baseUrl' and these tests will fail if you don't boot your server
Is there a frame of reference in which I was born before I was conceived?
1970s scifi/horror novel where protagonist is used by a crablike creature to feed its larvae, goes mad, and is defeated by retraumatising him
How do we objectively assess if a dialogue sounds unnatural or cringy?
How to kill a localhost:8080
Can I solder 12/2 Romex to extend wire 5 ft?
Wardrobe above a wall with fuse boxes
Deal the cards to the players
Quitting employee has privileged access to critical information
What could be a means to defeat a child’s nightmare?
It doesn't matter the side you see it
When to use mean vs median
Are small insurances worth it
Lock enemy's y-axis when using Vector3.MoveTowards to follow the player
How do you say “my friend is throwing a party, do you wanna come?” in german
Find maximum of the output from reduce
How to fix my table, centering of columns
Difference between 'stomach' and 'uterus'
Why do phishing e-mails use faked e-mail addresses instead of the real one?
Should we avoid writing fiction about historical events without extensive research?
Has Wakanda ever accepted refugees?
Make me a metasequence
What can I do if someone tampers with my SSH public key?
Where is this quote about overcoming the impossible said in "Interstellar"?
How to mitigate "bandwagon attacking" from players?
CircleCI version 2.1 - “Cannot find a definition for command named 'restore-cache'”
2019 Community Moderator ElectionHow to resolve $TERM not set on gradlew ./assembleRelease on CIrcleCI?Rails Precompiling assets for CIcircleci v2 config - how do we filter by owner in a workflow?CircleCI 2.0 Workflow - Deploy not workingRun a command on CircleCI only once for a branchCircleCI migration: Config fileCircleci runs on merged branchCircleCI API behaving differently from github commit trigger?Errors in CircleCI config.ymlCircleCI error your tests likely make requests to this 'baseUrl' and these tests will fail if you don't boot your server
I'm currently attempting to use the commands
feature available in CircleCI version 2.1, so that I can reuse some common commands. I'm testing using the CLI command:
circleci config process ./.circleci/config.latest.yaml > ./.circleci/config.yml
But I recieve the following error:
Error: Error calling workflow: 'main'
Error calling job: 'build'
Error calling command: 'build_source'
Cannot find a definition for command named restore-cache
It seems that restore-cache
works just fine in a straight-up version 2 config file, but when I try and process a 2.1 file using process
it kicks up a fuss.
Below is an edited version of my config.yaml
file which should hopefully be of some use. Please let me know if there is any additional information that would be useful.
version: 2.1
defaults: &defaults
/**
* Unimportant stuff
*/
aliases:
- &restore-root-cache
keys:
- v1-deps- .Branch - checksum "package.json"
- v1-deps- .Branch
- v1-deps
commands:
build_source:
description: 'Installs dependencies, then builds src, builds documentation, and runs tests'
steps:
- restore-cache: *restore-root-cache
- other-commands...
jobs:
build:
<<: *defaults
steps:
- checkout
- build_source
workflows:
version: 2.1
main:
jobs:
- build:
filters:
branches:
ignore: develop
continuous-integration circleci circleci-2.0 circleci-workflows
add a comment |
I'm currently attempting to use the commands
feature available in CircleCI version 2.1, so that I can reuse some common commands. I'm testing using the CLI command:
circleci config process ./.circleci/config.latest.yaml > ./.circleci/config.yml
But I recieve the following error:
Error: Error calling workflow: 'main'
Error calling job: 'build'
Error calling command: 'build_source'
Cannot find a definition for command named restore-cache
It seems that restore-cache
works just fine in a straight-up version 2 config file, but when I try and process a 2.1 file using process
it kicks up a fuss.
Below is an edited version of my config.yaml
file which should hopefully be of some use. Please let me know if there is any additional information that would be useful.
version: 2.1
defaults: &defaults
/**
* Unimportant stuff
*/
aliases:
- &restore-root-cache
keys:
- v1-deps- .Branch - checksum "package.json"
- v1-deps- .Branch
- v1-deps
commands:
build_source:
description: 'Installs dependencies, then builds src, builds documentation, and runs tests'
steps:
- restore-cache: *restore-root-cache
- other-commands...
jobs:
build:
<<: *defaults
steps:
- checkout
- build_source
workflows:
version: 2.1
main:
jobs:
- build:
filters:
branches:
ignore: develop
continuous-integration circleci circleci-2.0 circleci-workflows
add a comment |
I'm currently attempting to use the commands
feature available in CircleCI version 2.1, so that I can reuse some common commands. I'm testing using the CLI command:
circleci config process ./.circleci/config.latest.yaml > ./.circleci/config.yml
But I recieve the following error:
Error: Error calling workflow: 'main'
Error calling job: 'build'
Error calling command: 'build_source'
Cannot find a definition for command named restore-cache
It seems that restore-cache
works just fine in a straight-up version 2 config file, but when I try and process a 2.1 file using process
it kicks up a fuss.
Below is an edited version of my config.yaml
file which should hopefully be of some use. Please let me know if there is any additional information that would be useful.
version: 2.1
defaults: &defaults
/**
* Unimportant stuff
*/
aliases:
- &restore-root-cache
keys:
- v1-deps- .Branch - checksum "package.json"
- v1-deps- .Branch
- v1-deps
commands:
build_source:
description: 'Installs dependencies, then builds src, builds documentation, and runs tests'
steps:
- restore-cache: *restore-root-cache
- other-commands...
jobs:
build:
<<: *defaults
steps:
- checkout
- build_source
workflows:
version: 2.1
main:
jobs:
- build:
filters:
branches:
ignore: develop
continuous-integration circleci circleci-2.0 circleci-workflows
I'm currently attempting to use the commands
feature available in CircleCI version 2.1, so that I can reuse some common commands. I'm testing using the CLI command:
circleci config process ./.circleci/config.latest.yaml > ./.circleci/config.yml
But I recieve the following error:
Error: Error calling workflow: 'main'
Error calling job: 'build'
Error calling command: 'build_source'
Cannot find a definition for command named restore-cache
It seems that restore-cache
works just fine in a straight-up version 2 config file, but when I try and process a 2.1 file using process
it kicks up a fuss.
Below is an edited version of my config.yaml
file which should hopefully be of some use. Please let me know if there is any additional information that would be useful.
version: 2.1
defaults: &defaults
/**
* Unimportant stuff
*/
aliases:
- &restore-root-cache
keys:
- v1-deps- .Branch - checksum "package.json"
- v1-deps- .Branch
- v1-deps
commands:
build_source:
description: 'Installs dependencies, then builds src, builds documentation, and runs tests'
steps:
- restore-cache: *restore-root-cache
- other-commands...
jobs:
build:
<<: *defaults
steps:
- checkout
- build_source
workflows:
version: 2.1
main:
jobs:
- build:
filters:
branches:
ignore: develop
continuous-integration circleci circleci-2.0 circleci-workflows
continuous-integration circleci circleci-2.0 circleci-workflows
edited 10 hours ago
Anthon
30.9k1795149
30.9k1795149
asked 16 hours ago
tedigctedigc
104
104
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
The command is restore_cache
(with an underscore), not restore-cache
(with a dash) https://circleci.com/docs/2.0/configuration-reference/#restore_cache
It should work in commands.
add a comment |
restore cache is a special step that needs to be under a job. Not another command.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55021233%2fcircleci-version-2-1-cannot-find-a-definition-for-command-named-restore-cach%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The command is restore_cache
(with an underscore), not restore-cache
(with a dash) https://circleci.com/docs/2.0/configuration-reference/#restore_cache
It should work in commands.
add a comment |
The command is restore_cache
(with an underscore), not restore-cache
(with a dash) https://circleci.com/docs/2.0/configuration-reference/#restore_cache
It should work in commands.
add a comment |
The command is restore_cache
(with an underscore), not restore-cache
(with a dash) https://circleci.com/docs/2.0/configuration-reference/#restore_cache
It should work in commands.
The command is restore_cache
(with an underscore), not restore-cache
(with a dash) https://circleci.com/docs/2.0/configuration-reference/#restore_cache
It should work in commands.
answered 12 hours ago
dnephindnephin
11.7k33230
11.7k33230
add a comment |
add a comment |
restore cache is a special step that needs to be under a job. Not another command.
add a comment |
restore cache is a special step that needs to be under a job. Not another command.
add a comment |
restore cache is a special step that needs to be under a job. Not another command.
restore cache is a special step that needs to be under a job. Not another command.
answered 12 hours ago
FelicianoTechFelicianoTech
2,3091814
2,3091814
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55021233%2fcircleci-version-2-1-cannot-find-a-definition-for-command-named-restore-cach%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown