Comments (5)
- add argument to read env vars from a specified file when running
cirrus run
.
Take a look at #619, once merged it should allow for that.
from cirrus-cli.
cirrus version 0.98.0-21e0ceb
works great me. Thank you again.
from cirrus-cli.
Hey @craighurley,
You will need to manage secrets yourself and pass them to Cirrus CLI via --environment
flag:
export SECRET_TOKEN="..."
cirrus run --environment SECRET_TOKEN=$SECRET_TOKEN
This will override any SECRET_TOKEN
environment variable defined in your .cirrus.yml
.
from cirrus-cli.
Hi @fkorotkov
Thanks for that. I'm using sops and can successfully run this for a simple example:
cirrus run -e password=$(sops -d --extract '["password"]' sops.env)
If the task is complex and needs many secrets, I was planning on decrypting sops.env
to .env
locally, then running cirrus and have a task script to cat .env
into $CIRRUS_ENV
, e.g:
task:
set_env_script: cat .env >> $CIRRUS_ENV
build_script:
# commands that rely on multiple secrets in env vars
... but because I have gitignored .env
(so I don't accidentally commit secrets to git), .env
is not available within the cirrus task, unless I use the --dirty
argument. I would prefer not to use the --dirty
argument so that cirrus has read-only permissions.
Have I missed an option? Is there another way to set env vars that would suit my use case? Or could one of these options be added
- add argument to ignore
.gitignore
. - add argument to read env vars from a specified file when running
cirrus run
.
The second option would be my preference. It also opens the ability to use sops in such a way that the decrypted file does not need to be written to disk, e.g:
sops exec-file sops.env 'cirrus run --vars {}'
from cirrus-cli.
Amazing, thank you!
from cirrus-cli.
Related Issues (20)
- Error starting command with any configuration. HOT 9
- container results in arm64 image on MacOS Cirrus CLI, but amd64 in Cirrus CI HOT 4
- "(MISSING)" string in Jenkins log when pulling the VM
- Not detected INVALID_ARGUMENT task has background script and artifacts instructions with an identical name HOT 1
- "Execute in place" support for cirrus-cli HOT 2
- Persistent worker: Support isolation via VM for non-macos operating systems HOT 5
- Persistent worker: Configure isolation related parameters in persistent worker config HOT 1
- Tart: allow configuring volumes
- Support environment variables in gcp_credentials: workload_identity_provider: etc HOT 2
- Syncing working directory - endless loop HOT 1
- Waiting on `cirrus worker pause` not always working HOT 1
- Specify path to task definitions HOT 4
- task timed out: no heartbeats were received in the last 2m0s
- `on_timeout` execution behavioue
- Error: ssh: session already started HOT 1
- The project ‘xxxx’ is damaged and cannot be opened due to a parse error. Examine the project file for invalid edits or unresolved source control conflicts. HOT 3
- Integration test for task cancelation
- OTEL metric of VM startup time HOT 1
- RunConfig: switch TaskID from int64 to string HOT 1
- Warm Isolation for Persistent Worker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cirrus-cli.