PHP Remove Phing after PROD Deploy
We are currently using phing on deployment from jenkins to our different environments. We use it to do some cleanup. We would like to remove phing from our source/vendor folder after the build is completed.
Can phing remove itself as a final build step?
Or should i just be doing an rm -rf phing/?
php deployment phing
add a comment |
We are currently using phing on deployment from jenkins to our different environments. We use it to do some cleanup. We would like to remove phing from our source/vendor folder after the build is completed.
Can phing remove itself as a final build step?
Or should i just be doing an rm -rf phing/?
php deployment phing
add a comment |
We are currently using phing on deployment from jenkins to our different environments. We use it to do some cleanup. We would like to remove phing from our source/vendor folder after the build is completed.
Can phing remove itself as a final build step?
Or should i just be doing an rm -rf phing/?
php deployment phing
We are currently using phing on deployment from jenkins to our different environments. We use it to do some cleanup. We would like to remove phing from our source/vendor folder after the build is completed.
Can phing remove itself as a final build step?
Or should i just be doing an rm -rf phing/?
php deployment phing
php deployment phing
asked Nov 5 '18 at 18:30
user1050544user1050544
147216
147216
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
There are two parts to this answer:
Solution for Question
Your Phing installation should be done with composer. Do composer require phing/phing - and then you can use vendor/bin/phing to run your build.xml file (instead of say using a global install).
Then, when you're done, your last step to run could be composer remove phing/phing
Suggested Workflow
So, the idea with something like Jenkins is that you should be using it to do all of your build and processing on a build system. Then, it (Jenkins) is the tool that can do anything else on the remote systems for you. So, instead of having phing on the deployed server and then have it doing tasks, you'd tell Jenkins to do those tasks remotely. (This might be accomplished by each step having to re-ssh into that server to execute a new step). As these steps are part of the deploy process too, if any of them fail, the build will be considered failed and you'll have that insight. So, that being said, the solution I suggest is above, but I'd recommend changing everything else up.
That is the current workflow. Jenkins is running phing from a composer install..composer remove phing/phing should work nicely
– user1050544
Nov 5 '18 at 21:00
Cool - if it works, please upvote the solution. Thanks!
– Aaron Saray
Nov 5 '18 at 23:00
add a comment |
Imagine your project needs many dependencies, for example ramsey/uuid, phing/phing and pds/skeleton. Use composer require to add dependencies, but use --dev option when adding development depdendencies:
composer require ramsey/uuid
composer require --dev phing/phing
composer require --dev pds/skeleton
The content of your composer.json should be the following:
"require":
"ramsey/uuid": "^3.8"
,
"require-dev":
"pds/skeleton": "^1.0",
"phing/phing": "^2.16"
To install all your dependencies use the following command:
composer install
Now, if you want to remove your development dependencies type:
composer install --no-dev
The last command will only install your production dependencies and remove your development dependencies from vendor directory at once.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53160146%2fphp-remove-phing-after-prod-deploy%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are two parts to this answer:
Solution for Question
Your Phing installation should be done with composer. Do composer require phing/phing - and then you can use vendor/bin/phing to run your build.xml file (instead of say using a global install).
Then, when you're done, your last step to run could be composer remove phing/phing
Suggested Workflow
So, the idea with something like Jenkins is that you should be using it to do all of your build and processing on a build system. Then, it (Jenkins) is the tool that can do anything else on the remote systems for you. So, instead of having phing on the deployed server and then have it doing tasks, you'd tell Jenkins to do those tasks remotely. (This might be accomplished by each step having to re-ssh into that server to execute a new step). As these steps are part of the deploy process too, if any of them fail, the build will be considered failed and you'll have that insight. So, that being said, the solution I suggest is above, but I'd recommend changing everything else up.
That is the current workflow. Jenkins is running phing from a composer install..composer remove phing/phing should work nicely
– user1050544
Nov 5 '18 at 21:00
Cool - if it works, please upvote the solution. Thanks!
– Aaron Saray
Nov 5 '18 at 23:00
add a comment |
There are two parts to this answer:
Solution for Question
Your Phing installation should be done with composer. Do composer require phing/phing - and then you can use vendor/bin/phing to run your build.xml file (instead of say using a global install).
Then, when you're done, your last step to run could be composer remove phing/phing
Suggested Workflow
So, the idea with something like Jenkins is that you should be using it to do all of your build and processing on a build system. Then, it (Jenkins) is the tool that can do anything else on the remote systems for you. So, instead of having phing on the deployed server and then have it doing tasks, you'd tell Jenkins to do those tasks remotely. (This might be accomplished by each step having to re-ssh into that server to execute a new step). As these steps are part of the deploy process too, if any of them fail, the build will be considered failed and you'll have that insight. So, that being said, the solution I suggest is above, but I'd recommend changing everything else up.
That is the current workflow. Jenkins is running phing from a composer install..composer remove phing/phing should work nicely
– user1050544
Nov 5 '18 at 21:00
Cool - if it works, please upvote the solution. Thanks!
– Aaron Saray
Nov 5 '18 at 23:00
add a comment |
There are two parts to this answer:
Solution for Question
Your Phing installation should be done with composer. Do composer require phing/phing - and then you can use vendor/bin/phing to run your build.xml file (instead of say using a global install).
Then, when you're done, your last step to run could be composer remove phing/phing
Suggested Workflow
So, the idea with something like Jenkins is that you should be using it to do all of your build and processing on a build system. Then, it (Jenkins) is the tool that can do anything else on the remote systems for you. So, instead of having phing on the deployed server and then have it doing tasks, you'd tell Jenkins to do those tasks remotely. (This might be accomplished by each step having to re-ssh into that server to execute a new step). As these steps are part of the deploy process too, if any of them fail, the build will be considered failed and you'll have that insight. So, that being said, the solution I suggest is above, but I'd recommend changing everything else up.
There are two parts to this answer:
Solution for Question
Your Phing installation should be done with composer. Do composer require phing/phing - and then you can use vendor/bin/phing to run your build.xml file (instead of say using a global install).
Then, when you're done, your last step to run could be composer remove phing/phing
Suggested Workflow
So, the idea with something like Jenkins is that you should be using it to do all of your build and processing on a build system. Then, it (Jenkins) is the tool that can do anything else on the remote systems for you. So, instead of having phing on the deployed server and then have it doing tasks, you'd tell Jenkins to do those tasks remotely. (This might be accomplished by each step having to re-ssh into that server to execute a new step). As these steps are part of the deploy process too, if any of them fail, the build will be considered failed and you'll have that insight. So, that being said, the solution I suggest is above, but I'd recommend changing everything else up.
answered Nov 5 '18 at 18:55
Aaron SarayAaron Saray
1,099615
1,099615
That is the current workflow. Jenkins is running phing from a composer install..composer remove phing/phing should work nicely
– user1050544
Nov 5 '18 at 21:00
Cool - if it works, please upvote the solution. Thanks!
– Aaron Saray
Nov 5 '18 at 23:00
add a comment |
That is the current workflow. Jenkins is running phing from a composer install..composer remove phing/phing should work nicely
– user1050544
Nov 5 '18 at 21:00
Cool - if it works, please upvote the solution. Thanks!
– Aaron Saray
Nov 5 '18 at 23:00
That is the current workflow. Jenkins is running phing from a composer install..composer remove phing/phing should work nicely
– user1050544
Nov 5 '18 at 21:00
That is the current workflow. Jenkins is running phing from a composer install..composer remove phing/phing should work nicely
– user1050544
Nov 5 '18 at 21:00
Cool - if it works, please upvote the solution. Thanks!
– Aaron Saray
Nov 5 '18 at 23:00
Cool - if it works, please upvote the solution. Thanks!
– Aaron Saray
Nov 5 '18 at 23:00
add a comment |
Imagine your project needs many dependencies, for example ramsey/uuid, phing/phing and pds/skeleton. Use composer require to add dependencies, but use --dev option when adding development depdendencies:
composer require ramsey/uuid
composer require --dev phing/phing
composer require --dev pds/skeleton
The content of your composer.json should be the following:
"require":
"ramsey/uuid": "^3.8"
,
"require-dev":
"pds/skeleton": "^1.0",
"phing/phing": "^2.16"
To install all your dependencies use the following command:
composer install
Now, if you want to remove your development dependencies type:
composer install --no-dev
The last command will only install your production dependencies and remove your development dependencies from vendor directory at once.
add a comment |
Imagine your project needs many dependencies, for example ramsey/uuid, phing/phing and pds/skeleton. Use composer require to add dependencies, but use --dev option when adding development depdendencies:
composer require ramsey/uuid
composer require --dev phing/phing
composer require --dev pds/skeleton
The content of your composer.json should be the following:
"require":
"ramsey/uuid": "^3.8"
,
"require-dev":
"pds/skeleton": "^1.0",
"phing/phing": "^2.16"
To install all your dependencies use the following command:
composer install
Now, if you want to remove your development dependencies type:
composer install --no-dev
The last command will only install your production dependencies and remove your development dependencies from vendor directory at once.
add a comment |
Imagine your project needs many dependencies, for example ramsey/uuid, phing/phing and pds/skeleton. Use composer require to add dependencies, but use --dev option when adding development depdendencies:
composer require ramsey/uuid
composer require --dev phing/phing
composer require --dev pds/skeleton
The content of your composer.json should be the following:
"require":
"ramsey/uuid": "^3.8"
,
"require-dev":
"pds/skeleton": "^1.0",
"phing/phing": "^2.16"
To install all your dependencies use the following command:
composer install
Now, if you want to remove your development dependencies type:
composer install --no-dev
The last command will only install your production dependencies and remove your development dependencies from vendor directory at once.
Imagine your project needs many dependencies, for example ramsey/uuid, phing/phing and pds/skeleton. Use composer require to add dependencies, but use --dev option when adding development depdendencies:
composer require ramsey/uuid
composer require --dev phing/phing
composer require --dev pds/skeleton
The content of your composer.json should be the following:
"require":
"ramsey/uuid": "^3.8"
,
"require-dev":
"pds/skeleton": "^1.0",
"phing/phing": "^2.16"
To install all your dependencies use the following command:
composer install
Now, if you want to remove your development dependencies type:
composer install --no-dev
The last command will only install your production dependencies and remove your development dependencies from vendor directory at once.
answered Nov 13 '18 at 22:51
jawirajawira
34229
34229
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53160146%2fphp-remove-phing-after-prod-deploy%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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