Comments (6)
Hi @dkfitbit , I have been looking into this and I'd like to clarify what contexts you need these environment variables set for. I've attempted ways to set these variables through the startup script but have not had any luck so far.
from google-compute-engine-plugin.
Example:
export http_proxy="http://some.proxy:3128"
export https_proxy="http://some.proxy:3128"
export no_proxy="localhost,.internal,169.254.169.254"
# usual Jenkins start-up
java -jar slave.jar
# now all subprocesses started on this executor by Jenkins have $http_proxy set
There might be other adequate ways to make those variables propagate to (1) all jobs that run on the executor (2) but no other executors, but the most obvious way is to set them when launching the JNLP slave.jar, which is what the EC2 plugin does.
from google-compute-engine-plugin.
It might help to know that we have a mix of executor types: cloud VMs that Jenkins deploys, bare metal machines that Jenkins SSHes into, and Mac Minis that live in corp and that connect to Jenkins (because Jenkins cannot reach them through the firewall). Each of these different machine types needs different environment variables set. One Jenkins job might use multiple machine types, perhaps even in parallel, and the environment variable values for a given machine type are the same for hundreds of jobs.
TL;DR: this is a major pain point compared to the EC2 plugin, which simply lets us customize the slave jar command line.
from google-compute-engine-plugin.
Thanks, that's actually extremely helpful. I would need to consult with our team on completely opening up customization of the launch command in that way. I don't believe it was intended to be used in this way, but it is actually now possible with the javaExecPath field (once release 3.2.0 hits the update center).
While we work on a more robust solution, here is the workaround that was just enabled. Configure the javaExecPath field something like this:
export http_proxy="http://some.proxy:3128";export https_proxy="https://some.proxy:3128";export no_proxy="localhost,.internal,169.254.169.254";java
It will work as long as the last part of the string is java
or whatever the appropriate java executable path is.
from google-compute-engine-plugin.
Any updates? @dkfitbit
from google-compute-engine-plugin.
We haven't had time to upgrade from 1.0.5 (we're several months behind on our patching for all plugins, not just GCE).
from google-compute-engine-plugin.
Related Issues (20)
- Feature request: Option to delay agent connection to allow custom startup script to finish HOT 3
- Option the set MAXIMUM triggered builds for an agent
- Enable billing measure of GCP Jenkins workers HOT 2
- The hpi download link is broken HOT 2
- Add new spot for provision type HOT 2
- New Node with "Google Compute Engine" failed HOT 1
- Add an ability to provide image family name instead of image name HOT 1
- Create snapshot defaulting to multi-region
- Expose Prefix Start Agent Command and Suffix Start Agent Command
- Jobs on preempted VMs hang indefinitely until manually cancelled HOT 2
- Option to limit run time of VM HOT 1
- Large number of offline build executors when there is no capacity
- Add option for enabling nested virtualization
- External IP Address can't be configured HOT 10
- Attaching a start up script to an instance template
- Nullsafe operator required
- Change mahine type from configuration not working
- Long wait times to provision a VM in GCP HOT 4
- Jenkins losing connection to GCE VM / GCE VM shutting down HOT 1
- Preempted VMs are sometimes not properly detected 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 google-compute-engine-plugin.