Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9197191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:01:05+00:00 2026-06-17T22:01:05+00:00

I have 2 jobs: Helper and Main and the single jenkins instance (which is

  • 0

I have 2 jobs: “Helper” and “Main” and the single jenkins instance (which is the host and the executor).

The helper manages 3rd party resource and makes the preparation for the Main job (to be precise – it creates the environment for the application to be deployed for testing).

The only artifact for the helper job is a single file with IP of the environment prepared especially for the Main job.

How would I pass back the build from the Helper to the Main in this case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:01:06+00:00Added an answer on June 17, 2026 at 10:01 pm

    You are saying that you only need to pass a file with an IP to the “Main” job. If all you need is that IP, there are easier ways of doing it (without files), I will describe both.

    To pass an artifact from one job to another

    In the “Helper” job, you need to archive that file from your workspace.

    1. In post-build actions, choose Archive the artifacts
    2. Put a path relative to the workspace. You can use wildcards, or hardcode the name of the file if it is always same.
    3. Configure this job to automatically trigger your “Main” job using Trigger/Call builds on other projects build step. If you don’t have this plugin, you can get it here
    4. For Projects to build, enter the name of your “Main” job

    Now, in the “Main” job, you need to copy this artifact from the previous (“Helper”) job.

    1. For the first build step, select Copy artifacts from another project build step. If you don’t have this plugin, you can get it here
    2. For the Project name, enter the name of your “Helper” job
    3. For Which build, select Latest successful build
    4. For Artifacts to copy, use **/yourartifactname*.* Your artifact name will be what you configured in “Helper” job. Using **/ in front makes sure it will ignore any directory structure before getting to the artifact
    5. For, Target directory, specify a location in your “Main” job’s workspace where this file will be copied too.
    6. Checkmark Flatten directories, so the file goes directly to the location specified in Step 5, else it will retain the directory structure that it was archived under (in “Helper” job)

    Now, your “Main” job has the file from “Helper” job in it’s workspace. Use it like you would any other file in your workspace

    To pass a variable from one job to another

    Like I mentioned, if all you need is that one IP address, that you have as a variable at one point in time in “Helper” job, you just send it to “Main” job using the Trigger/Call builds on other projects step that you configured in steps 3 and 4 of the “Helper” job. In this case, you don’t need any special configuration on “Main” job.

    1. Configure “Helper” job to automatically trigger your “Main” job using Trigger/Call builds on other projects build step. If you don’t have this plugin, you can get it here
    2. For Projects to build, enter the name of your “Main” job
    3. Click Add Parameters button
    4. Select Predefined parameters
    5. Type VarForMain=$VarFromHelper, where VarFromHelper is your environment variable from the “Helper” job that contains your IP address, and VarForMain is the environment variable that will be set in your “Main” job to this value. There is no reason why these can’t have the same name.

    Now, in your “Main” job, you can reference $VarForMain as you would any other environment variable

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two jobs in jenkins, both of which need the same parameter. How
I have three jobs that I would like to serialize in Jenkins. They should
I have a Jobs resource and every job has a location. How do I
I have a linux server on which several at jobs are scheduled. When I
I have two jobs on my Jenkins server. Both are based on git but
I have a silverlight application which kicks off a number of jobs on the
I have 2 jobs in Jenkins: Build and run unit tests (Build and) run
I have a 'jobs' controller which allows users to assign tasks/jobs to each other.
I have two jobs: Upload Launch-instance I want to make Launch-instance dependent on the
I'm having some issues with jenkins and gerrit. We have some jobs that verifies

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.