Jenkins declarative pipeline - pass command arguments to docker runjenkins pipeline docker build on docker agentSetting build args for dockerfile agent using a Jenkins declarative pipelineDeclarative Jenkins pipeline and DockerRestrict Jenkins declarative pipeline agents at the server level?Template docker agent in jenkins Declarative pipelineAdding additional run arguments to docker container in Jenkins PipelineInsert a config file into a declarative Jenkins pipeline Docker container from DockerfileJenkins Docker Declarative .withRunRun sudo within Jenkins dockerfile pipelineHow to build on remote Docker server with Jenkins declarative pipeline?

What are "the high ends of castles" called?

How does mathematics work?

MITM on HTTPS traffic in Kazakhstan 2019

What do Unicorns want?

Langton's Ant Periodic Behavior

Why is there an extra "t" in Lemmatization?

Is it ethical to tell my teaching assistant that I like him?

How can electronics on board JWST survive the low operating temperature while it's difficult to survive lunar nights?

What does the following chess proverb mean: "Chess is a sea where a gnat may drink from and an elephant may bathe in."

Can a ring have no zero divisors while being non-commutative and having no unity?

Is it better to deliver many low-value stories or few high-value stories?

Has Iron Man made any suit for underwater combat?

How to create quantum circuits from scratch

Did Don Young threaten John Boehner with a 10 inch blade to the throat?

Is it better to merge "often" or only after completion do a big merge of feature branches?

How much did NASA help with the making of "First Man"?

How can I remove studs and screws from the inside of drywall when installing a pocket door without needing to do paint and patch work on both sides?

Host telling me to cancel my booking in exchange for a discount?

Quickest way to move a line in a text file before another line in a text file?

Piece of fabric in planter, how to use it?

Killing a star safely

Reflect IR beam off reflector instead of emitting straight to TSOP receiver

Is there an English word to describe when a sound "protrudes"?

Plotting maxima within a simplex



Jenkins declarative pipeline - pass command arguments to docker run


jenkins pipeline docker build on docker agentSetting build args for dockerfile agent using a Jenkins declarative pipelineDeclarative Jenkins pipeline and DockerRestrict Jenkins declarative pipeline agents at the server level?Template docker agent in jenkins Declarative pipelineAdding additional run arguments to docker container in Jenkins PipelineInsert a config file into a declarative Jenkins pipeline Docker container from DockerfileJenkins Docker Declarative .withRunRun sudo within Jenkins dockerfile pipelineHow to build on remote Docker server with Jenkins declarative pipeline?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Is there a way to pass parameters to the docker run entrypoint comand?
what i mean is, for the run command I need to have something like this:



docker run myImage --host.url.expected=http://url --host.url.actual=http://url


Currently the pipeline that I've build would look like:



agent 
dockerfile
args '--host.url.expected=$params.EXPECTED --host.url.actual=$params.ACTUAL'




but like this, will actually do something like:



docker run --host.url.expected=http://url --host.url.actual=http://url myImage


causing the script to fail of course



is there a way to achieve what I need?
Ideally still using a declarative pipeline... with as less boilerplate as possible



Let me know if you need more details, I can add the whole jenkinsfile / dockerfile if needed










share|improve this question

















  • 1





    Could you make host.url.expected and host.url.actual environment variables and have your command reading them, them then pass something like -args '-e -host_url_expected=url -e host_url_actual=url myImage'

    – Miguel Marques
    Mar 26 at 15:43











  • works as a workaround, but is not what I am looking for

    – Alex
    Mar 26 at 17:54

















0















Is there a way to pass parameters to the docker run entrypoint comand?
what i mean is, for the run command I need to have something like this:



docker run myImage --host.url.expected=http://url --host.url.actual=http://url


Currently the pipeline that I've build would look like:



agent 
dockerfile
args '--host.url.expected=$params.EXPECTED --host.url.actual=$params.ACTUAL'




but like this, will actually do something like:



docker run --host.url.expected=http://url --host.url.actual=http://url myImage


causing the script to fail of course



is there a way to achieve what I need?
Ideally still using a declarative pipeline... with as less boilerplate as possible



Let me know if you need more details, I can add the whole jenkinsfile / dockerfile if needed










share|improve this question

















  • 1





    Could you make host.url.expected and host.url.actual environment variables and have your command reading them, them then pass something like -args '-e -host_url_expected=url -e host_url_actual=url myImage'

    – Miguel Marques
    Mar 26 at 15:43











  • works as a workaround, but is not what I am looking for

    – Alex
    Mar 26 at 17:54













0












0








0








Is there a way to pass parameters to the docker run entrypoint comand?
what i mean is, for the run command I need to have something like this:



docker run myImage --host.url.expected=http://url --host.url.actual=http://url


Currently the pipeline that I've build would look like:



agent 
dockerfile
args '--host.url.expected=$params.EXPECTED --host.url.actual=$params.ACTUAL'




but like this, will actually do something like:



docker run --host.url.expected=http://url --host.url.actual=http://url myImage


causing the script to fail of course



is there a way to achieve what I need?
Ideally still using a declarative pipeline... with as less boilerplate as possible



Let me know if you need more details, I can add the whole jenkinsfile / dockerfile if needed










share|improve this question














Is there a way to pass parameters to the docker run entrypoint comand?
what i mean is, for the run command I need to have something like this:



docker run myImage --host.url.expected=http://url --host.url.actual=http://url


Currently the pipeline that I've build would look like:



agent 
dockerfile
args '--host.url.expected=$params.EXPECTED --host.url.actual=$params.ACTUAL'




but like this, will actually do something like:



docker run --host.url.expected=http://url --host.url.actual=http://url myImage


causing the script to fail of course



is there a way to achieve what I need?
Ideally still using a declarative pipeline... with as less boilerplate as possible



Let me know if you need more details, I can add the whole jenkinsfile / dockerfile if needed







docker jenkins jenkins-pipeline






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 13:23









AlexAlex

2563 silver badges10 bronze badges




2563 silver badges10 bronze badges







  • 1





    Could you make host.url.expected and host.url.actual environment variables and have your command reading them, them then pass something like -args '-e -host_url_expected=url -e host_url_actual=url myImage'

    – Miguel Marques
    Mar 26 at 15:43











  • works as a workaround, but is not what I am looking for

    – Alex
    Mar 26 at 17:54












  • 1





    Could you make host.url.expected and host.url.actual environment variables and have your command reading them, them then pass something like -args '-e -host_url_expected=url -e host_url_actual=url myImage'

    – Miguel Marques
    Mar 26 at 15:43











  • works as a workaround, but is not what I am looking for

    – Alex
    Mar 26 at 17:54







1




1





Could you make host.url.expected and host.url.actual environment variables and have your command reading them, them then pass something like -args '-e -host_url_expected=url -e host_url_actual=url myImage'

– Miguel Marques
Mar 26 at 15:43





Could you make host.url.expected and host.url.actual environment variables and have your command reading them, them then pass something like -args '-e -host_url_expected=url -e host_url_actual=url myImage'

– Miguel Marques
Mar 26 at 15:43













works as a workaround, but is not what I am looking for

– Alex
Mar 26 at 17:54





works as a workaround, but is not what I am looking for

– Alex
Mar 26 at 17:54












0






active

oldest

votes










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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358282%2fjenkins-declarative-pipeline-pass-command-arguments-to-docker-run%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358282%2fjenkins-declarative-pipeline-pass-command-arguments-to-docker-run%23new-answer', 'question_page');

);

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







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현