# Tips, Tricks, and Hacks

**URL:** https://discuss.circleci.com/c/resources/tips-tricks-hacks/40.md

[Latest](https://discuss.circleci.com/latest.md) · [Categories](https://discuss.circleci.com/categories.md) · [Tags](https://discuss.circleci.com/tags.md)

---

## [About the Tips, Tricks, and Hacks category](https://discuss.circleci.com/t/about-the-tips-tricks-and-hacks-category/1495)

<div class="topic-metadata">

**Author:** [@kimh](https://discuss.circleci.com/u/kimh)\
**Replies:** 0\
**Last updated:** [January 13, 2016, 6:32am UTC](https://discuss.circleci.com/t/about-the-tips-tricks-and-hacks-category/1495 "2016-01-13T06:32:04Z")

</div>

Share your tips, tricks and hacks for getting the most out of CircleCI (This category was previously called ‘hacks’.)

---

## [Need help with the command script](https://discuss.circleci.com/t/need-help-with-the-command-script/43948)

<div class="topic-metadata">

**Author:** [@amazedrockuser](https://discuss.circleci.com/u/amazedrockuser)\
**Replies:** 1\
**Last updated:** [August 13, 2024, 4:28am UTC](https://discuss.circleci.com/t/need-help-with-the-command-script/43948 "2024-08-13T04:28:13Z")

</div>

What would be the equivalent of below in the circleci script: | echo “y $(WORKSPACE-REGION-URL) $(CSE-DEVELOP-PAT) $(EXISTING-CLUSTER-ID) $(WORKSPACE-ORG-ID) 15001” | databricks-connect configure I tried the abo…

---

## [Working with deploy keys, ssh, and multiple repositories](https://discuss.circleci.com/t/working-with-deploy-keys-ssh-and-multiple-repositories/28818)

<div class="topic-metadata">

**Author:** [@sigHUPster](https://discuss.circleci.com/u/sigHUPster)\
**Replies:** 3\
**Last updated:** [January 17, 2024, 2:07pm UTC](https://discuss.circleci.com/t/working-with-deploy-keys-ssh-and-multiple-repositories/28818 "2024-01-17T14:07:11Z")

</div>

If you’re working with multiple git repositories and you are using deploy keys you might keep encountering authentication issues. In my case I was trying to pip install a module from a different repository than that whe…

---

## [CircleCI reporting](https://discuss.circleci.com/t/circleci-reporting/50194)

<div class="topic-metadata">

**Author:** [@Arindam](https://discuss.circleci.com/u/Arindam)\
**Replies:** 0\
**Last updated:** [January 10, 2024, 2:45pm UTC](https://discuss.circleci.com/t/circleci-reporting/50194 "2024-01-10T14:45:59Z")

</div>

I’m very new to Circle CI. Developed one Selenium-Java framework which generates Extent report and same can be seen When executed from GitAction , but after successful run , Not able to see the same report from circlecI …

---

## [Building Multiple pipeline from One Repo/Project](https://discuss.circleci.com/t/building-multiple-pipeline-from-one-repo-project/50193)

<div class="topic-metadata">

**Author:** [@Arindam](https://discuss.circleci.com/u/Arindam)\
**Replies:** 0\
**Last updated:** [January 10, 2024, 2:35pm UTC](https://discuss.circleci.com/t/building-multiple-pipeline-from-one-repo-project/50193 "2024-01-10T14:35:22Z")

</div>

Hi, I’m very new to “circleci” and need to create 2 pipelines using the same Repo/Project hosting Selenium-Java scripts. When tried to create 2 Config file, realized that circlecI doesn’t allow multiple “confirg.Yaml”. …

---

## [Run builds on CircleCI using a local config file](https://discuss.circleci.com/t/run-builds-on-circleci-using-a-local-config-file/17355)

<div class="topic-metadata">

**Author:** [@fernfernfern](https://discuss.circleci.com/u/fernfernfern)\
**Replies:** 8\
**Last updated:** [January 3, 2024, 1:47pm UTC](https://discuss.circleci.com/t/run-builds-on-circleci-using-a-local-config-file/17355 "2024-01-03T13:47:27Z")

</div>

Have you ever wanted to try out new changes to your CI configuration without the tedium of pushing new commits and polluting your git history? Here’s a simple technique you can use with CircleCI to quickly try out new it…

---

## [Persist\_to\_workspace vs \`save\_cache\` performance](https://discuss.circleci.com/t/persist-to-workspace-vs-save-cache-performance/31391)

<div class="topic-metadata">

**Author:** [@jamesarosen](https://discuss.circleci.com/u/jamesarosen)\
**Replies:** 8\
**Last updated:** [November 3, 2023, 3:21pm UTC](https://discuss.circleci.com/t/persist-to-workspace-vs-save-cache-performance/31391 "2023-11-03T15:21:16Z")

</div>

I’m trying to optimize our build. Up until recently, we had A dependencies task that checked out from git, ran bundle install and yarn install, and yarn compile, with caching around each of the four steps A dependencie…

---

## [Repository Corruption Causing \`brew update\` Error](https://discuss.circleci.com/t/repository-corruption-causing-brew-update-error/48529)

<div class="topic-metadata">

**Author:** [@naoya](https://discuss.circleci.com/u/naoya)\
**Replies:** 0\
**Last updated:** [July 4, 2023, 2:47am UTC](https://discuss.circleci.com/t/repository-corruption-causing-brew-update-error/48529 "2023-07-04T02:47:23Z")

</div>

Summary: As of June 30th 2023 we are aware of an issue that is causing errors when running brew update. The problem has been identified as repository corruption on the GitHub side, and GitHub has taken steps to fix it. S…

---

## [Config Policy Examples?](https://discuss.circleci.com/t/config-policy-examples/47796)

<div class="topic-metadata">

**Author:** [@Brendan](https://discuss.circleci.com/u/Brendan)\
**Replies:** 0\
**Last updated:** [April 17, 2023, 5:09pm UTC](https://discuss.circleci.com/t/config-policy-examples/47796 "2023-04-17T17:09:56Z")

</div>

Hello All, I know this new feature is just in preview circleci\[.\]com/docs/config-policy-management-overview/ but does anyone have any examples to share? We’d specifically love to prevent people from running stuff like…

---

## [How to copy file while Rerun with SSH?](https://discuss.circleci.com/t/how-to-copy-file-while-rerun-with-ssh/38787)

<div class="topic-metadata">

**Author:** [@mqchau](https://discuss.circleci.com/u/mqchau)\
**Replies:** 2\
**Last updated:** [March 4, 2023, 12:24pm UTC](https://discuss.circleci.com/t/how-to-copy-file-while-rerun-with-ssh/38787 "2023-03-04T12:24:39Z")

</div>

While I use the feature to “Rerun with SSH”, I need to copy some file from container to my laptop. About a year ago, I could use “scp -P \<port\_number\> \<ip\_address\>:\<path\_to\_file\> .” from my laptop to get it. But now I ca…

---

## [Cancel all of the Approval jobs in the branch](https://discuss.circleci.com/t/cancel-all-of-the-approval-jobs-in-the-branch/45950)

<div class="topic-metadata">

**Author:** [@naoya](https://discuss.circleci.com/u/naoya)\
**Replies:** 1\
**Last updated:** [November 14, 2022, 6:09am UTC](https://discuss.circleci.com/t/cancel-all-of-the-approval-jobs-in-the-branch/45950 "2022-11-14T06:09:11Z")

</div>

CircleCI has a feature to hold a job until someone approves it. However, when users commits a lot, each workflow will remain on hold until canceled, and if there are many workflows, the canceling might be time-consuming.…

---

## [Run an expensive job before merging a PR](https://discuss.circleci.com/t/run-an-expensive-job-before-merging-a-pr/45912)

<div class="topic-metadata">

**Author:** [@matt-dalton](https://discuss.circleci.com/u/matt-dalton)\
**Replies:** 2\
**Last updated:** [October 31, 2022, 11:47pm UTC](https://discuss.circleci.com/t/run-an-expensive-job-before-merging-a-pr/45912 "2022-10-31T23:47:39Z")

</div>

We are building a CI pipeline for a mobile project. We’d like to be able to trigger a test build, plus run E2E & performance tests on each PR to prevent regressions. The problem is: mobile builds and E2E tests are expen…

---

## [Rotating all of the Organizations Deploy keys](https://discuss.circleci.com/t/rotating-all-of-the-organizations-deploy-keys/45949)

<div class="topic-metadata">

**Author:** [@naoya](https://discuss.circleci.com/u/naoya)\
**Replies:** 1\
**Last updated:** [October 31, 2022, 1:10pm UTC](https://discuss.circleci.com/t/rotating-all-of-the-organizations-deploy-keys/45949 "2022-10-31T13:10:41Z")

</div>

Users sometime would like to rotate their deploy keys such as when there are new security changes in the company or simply to take good security practice. For, CircleCI Build Deploy Key is important when retrieving the …

---

## [.Net 6 Pipeline with SQL Server, Postgresql, & Publishing to Nuget Example](https://discuss.circleci.com/t/net-6-pipeline-with-sql-server-postgresql-publishing-to-nuget-example/45782)

<div class="topic-metadata">

**Author:** [@mik3c](https://discuss.circleci.com/u/mik3c)\
**Replies:** 0\
**Last updated:** [October 15, 2022, 9:14pm UTC](https://discuss.circleci.com/t/net-6-pipeline-with-sql-server-postgresql-publishing-to-nuget-example/45782 "2022-10-15T21:14:26Z")

</div>

I wanted to share this pipeline I built for one of my SDK projects which has been very useful to me and solved a number of publishing & testing problems. It uses a few intermediate and (at least one unconventional) tech…

---

## [Is there a way to add annotations to workflows?](https://discuss.circleci.com/t/is-there-a-way-to-add-annotations-to-workflows/45653)

<div class="topic-metadata">

**Author:** [@alexey-medvedchikov](https://discuss.circleci.com/u/alexey-medvedchikov)\
**Replies:** 0\
**Last updated:** [October 3, 2022, 10:27am UTC](https://discuss.circleci.com/t/is-there-a-way-to-add-annotations-to-workflows/45653 "2022-10-03T10:27:35Z")

</div>

Hi, folks, I’m coming from BuildKite service and I was able to find and port all things except for one: annotations (\`buildkite-agent annotate\` v3 | Buildkite Documentation). It is quite useful feature to provide quickl…

---

## [Dependabot... but for CircleCI](https://discuss.circleci.com/t/dependabot-but-for-circleci/45613)

<div class="topic-metadata">

**Author:** [@pbrondum](https://discuss.circleci.com/u/pbrondum)\
**Replies:** 0\
**Last updated:** [September 29, 2022, 12:10pm UTC](https://discuss.circleci.com/t/dependabot-but-for-circleci/45613 "2022-09-29T12:10:51Z")

</div>

Check out the small dependabot for CircleCI. Then you dont have to manually keep track of images and orb updates. It is open source and we are open to feedback and pull requests. GitHub - BESTSELLER/dependabot-circleci:…

---

## [HOWTO: further reduce config.yml copypasta](https://discuss.circleci.com/t/howto-further-reduce-config-yml-copypasta/43102)

<div class="topic-metadata">

**Author:** [@relaxdiego](https://discuss.circleci.com/u/relaxdiego)\
**Replies:** 5\
**Last updated:** [September 26, 2022, 3:48am UTC](https://discuss.circleci.com/t/howto-further-reduce-config-yml-copypasta/43102 "2022-09-26T03:48:32Z")

</div>

If you’re still experiencing the pain of config.yml copypasta even after using orbs, here’s a possible next step in your evolution. https://youtu.be/4a7IRoDQMWI

---

## [How-to: build and push Docker images with Kaniko](https://discuss.circleci.com/t/how-to-build-and-push-docker-images-with-kaniko/44923)

<div class="topic-metadata">

**Author:** [@kelvintaywl](https://discuss.circleci.com/u/kelvintaywl)\
**Replies:** 0\
**Last updated:** [August 2, 2022, 3:08am UTC](https://discuss.circleci.com/t/how-to-build-and-push-docker-images-with-kaniko/44923 "2022-08-02T03:08:25Z")

</div>

Brief Kaniko is a tool to build and push Docker images from within a container or k8s cluster. Importantly, this is done without a Docker daemon. For CircleCI builds, Kaniko allows us to build and push Docker images w…

---

## [Pre-commit hooks to validate CircleCI configuration](https://discuss.circleci.com/t/pre-commit-hooks-to-validate-circleci-configuration/44529)

<div class="topic-metadata">

**Author:** [@yanngolanski](https://discuss.circleci.com/u/yanngolanski)\
**Replies:** 2\
**Last updated:** [June 28, 2022, 9:10pm UTC](https://discuss.circleci.com/t/pre-commit-hooks-to-validate-circleci-configuration/44529 "2022-06-28T21:10:35Z")

</div>

Has anyone used pre-commit and check-jsonschema to validate CircleCI config files? I know that syntaqx/git-hooks has a specific CircleCI one, so I could use that, but I already use the above one so having yet-another-t…

---

## [How to avoid CI if only certain files change?](https://discuss.circleci.com/t/how-to-avoid-ci-if-only-certain-files-change/44360)

<div class="topic-metadata">

**Author:** [@mathomp4](https://discuss.circleci.com/u/mathomp4)\
**Replies:** 6\
**Last updated:** [June 9, 2022, 8:13pm UTC](https://discuss.circleci.com/t/how-to-avoid-ci-if-only-certain-files-change/44360 "2022-06-09T20:13:09Z")

</div>

All, I probably should have asked this long ago, but I’m getting around to it now. Namely, on some of my GitHub Actions I have it set so that if in a PR the only files that change are say Markdown or JSON, I don’t run m…

---

## [Why all pipelines is triggering by admin account on my circleCI organization?](https://discuss.circleci.com/t/why-all-pipelines-is-triggering-by-admin-account-on-my-circleci-organization/41588)

<div class="topic-metadata">

**Author:** [@mankut14](https://discuss.circleci.com/u/mankut14)\
**Replies:** 1\
**Last updated:** [January 25, 2022, 11:06pm UTC](https://discuss.circleci.com/t/why-all-pipelines-is-triggering-by-admin-account-on-my-circleci-organization/41588 "2022-01-25T23:06:15Z")

</div>

Hi, while in my organization is pull request or merged into the master branch, there is the pipeline in CircleCI, but I don’t understand why it’s triggered by Admin account. Can I change it or can anyone explain to me wh…

---

## [Re-implemented the ability to "Bust Cache" in cirlceci 2.1 workflows](https://discuss.circleci.com/t/re-implemented-the-ability-to-bust-cache-in-cirlceci-2-1-workflows/42472)

<div class="topic-metadata">

**Author:** [@unlikelyzero](https://discuss.circleci.com/u/unlikelyzero)\
**Replies:** 0\
**Last updated:** [January 4, 2022, 11:24pm UTC](https://discuss.circleci.com/t/re-implemented-the-ability-to-bust-cache-in-cirlceci-2-1-workflows/42472 "2022-01-04T23:24:26Z")

</div>

I don’t know where else to put this, but my team had a very specific reason for needing Cache Busting which was removed from CircleCI 2.X. Make a Runtime Parameter openmct/config.yml at 86e5d10fc172e5a3c9627df5371cd6326…

---

## [Custom Checkout command](https://discuss.circleci.com/t/custom-checkout-command/31624)

<div class="topic-metadata">

**Author:** [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Replies:** 1\
**Last updated:** [November 1, 2021, 8:58pm UTC](https://discuss.circleci.com/t/custom-checkout-command/31624 "2021-11-01T20:58:43Z")

</div>

Hi folks, I know there have been several requests over time for the ability to modify the checkout step. It was previously thought to be not possible by users due to the $CHECKOUT\_KEY env only existing in the checkout s…

---

## [Play sound when pipeline finishes](https://discuss.circleci.com/t/play-sound-when-pipeline-finishes/40364)

<div class="topic-metadata">

**Author:** [@ozomer](https://discuss.circleci.com/u/ozomer)\
**Replies:** 1\
**Last updated:** [June 16, 2021, 9:09pm UTC](https://discuss.circleci.com/t/play-sound-when-pipeline-finishes/40364 "2021-06-16T21:09:28Z")

</div>

We have long running pipelines, so I typically keep the pipeline webpage open in another screen and wait for everything to become green. It would be nice to have a sound effect when the pipeline ends (successfully or no…

---

## [Caching based on the checksum of a directory's contents](https://discuss.circleci.com/t/caching-based-on-the-checksum-of-a-directorys-contents/28748)

<div class="topic-metadata">

**Author:** [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Replies:** 2\
**Last updated:** [May 16, 2021, 2:43am UTC](https://discuss.circleci.com/t/caching-based-on-the-checksum-of-a-directorys-contents/28748 "2021-05-16T02:43:50Z")

</div>

Inspired by a couple questions here, I wrote up a way to cache key based on your directories contents using md5sum. Hope it helps. (I’m sure there is a way to do this cleaner too) - run: | echo $(find ./…

---

## [How to untar artifacts for persist\_to\_workspace?](https://discuss.circleci.com/t/how-to-untar-artifacts-for-persist-to-workspace/39771)

<div class="topic-metadata">

**Author:** [@tupui](https://discuss.circleci.com/u/tupui)\
**Replies:** 0\
**Last updated:** [April 14, 2021, 7:22am UTC](https://discuss.circleci.com/t/how-to-untar-artifacts-for-persist-to-workspace/39771 "2021-04-14T07:22:08Z")

</div>

Hi, We are doing this to store our documentation: - store\_artifacts: path: doc/build/html-scipyorg destination: html-scipyorg - persist\_to\_workspace: root: doc/build paths: - html-s…

---

## [Best practice for reusing circleci config between application repos](https://discuss.circleci.com/t/best-practice-for-reusing-circleci-config-between-application-repos/38950)

<div class="topic-metadata">

**Author:** [@danielinclouds](https://discuss.circleci.com/u/danielinclouds)\
**Replies:** 3\
**Last updated:** [February 5, 2021, 10:43am UTC](https://discuss.circleci.com/t/best-practice-for-reusing-circleci-config-between-application-repos/38950 "2021-02-05T10:43:13Z")

</div>

Hi, I’m looking for a way to share the same pipeline between multiple applications. The goal is to mitigate many copy/paste between application repositories when I add a new feature to the pipeline. Right now, I have a…

---

## [CircleCIに関する動画コンテンツ紹介(2021/02/01現在)](https://discuss.circleci.com/t/circleci-2021-02-01/38959)

<div class="topic-metadata">

**Author:** [@Masahiko](https://discuss.circleci.com/u/Masahiko)\
**Replies:** 0\
**Last updated:** [January 30, 2021, 3:57am UTC](https://discuss.circleci.com/t/circleci-2021-02-01/38959 "2021-01-30T03:57:46Z")

</div>

はじめに CircleCIが提供する動画コンテンツのうち、日本語でご覧いただけるものは、CircleCI Japanese (日本語) としてリストにまとめてあります。 CircleCI Japanese (日本語) CircleCI以外で公開されている日本語動画コンテンツをここでは紹介させていただきます。 (なお、技術的な内容や市場の状況などは収録の際の状況を反映しており、ご覧いただく時点の状況とは必ずしも一致しないことがあり…

---

## [Trigger specific job by github pull request comment](https://discuss.circleci.com/t/trigger-specific-job-by-github-pull-request-comment/38676)

<div class="topic-metadata">

**Author:** [@OrLevy23](https://discuss.circleci.com/u/OrLevy23)\
**Replies:** 1\
**Last updated:** [January 5, 2021, 8:41pm UTC](https://discuss.circleci.com/t/trigger-specific-job-by-github-pull-request-comment/38676 "2021-01-05T20:41:38Z")

</div>

following back on this https://discuss.circleci.com/t/rebuild-via-github-comment/14175 from 2017 was wondering if there is a possiblity to achieve this by now (with workflow enabled) thanks in advance

---

## [I created a template for automatic python packaging with circleCI](https://discuss.circleci.com/t/i-created-a-template-for-automatic-python-packaging-with-circleci/38149)

<div class="topic-metadata">

**Author:** [@caleb15](https://discuss.circleci.com/u/caleb15)\
**Replies:** 5\
**Last updated:** [November 18, 2020, 11:28pm UTC](https://discuss.circleci.com/t/i-created-a-template-for-automatic-python-packaging-with-circleci/38149 "2020-11-18T23:28:08Z")

</div>

see https://github.com/15five/python-circleci-package-boilerplate It uses the unlicense so it’s about as open-source as you can get :slight\_smile:

[Next page](https://discuss.circleci.com/c/resources/tips-tricks-hacks/40.md?page=1)
