Closed ahmed-abdulmoniem closed 7 years ago
@FernandoMorais?
Any hint please @FernandoMorais ?
Hi @ahmed-abdulmoniem!
How did you setup your release workflow? You should select the root folder you want to publish on Heroku.
In my workflow I setup a build that runs Gulp and copy all files (except node_modules) to an output dir, after that it runs a release workflow that push to Heroku from that dir.
Give me more information on how you'd setup your workflow.
Regards, Fernando
Hi @FernandoMorais
I am using your task in the Build tasks of TFS.
I am pushing the whole repository to heroku so I don't create any folders?
Is it a Node.js project? Please, attach a screenshot from "select path" dialog to help me see how your folders are.
Yes, it is.
@FernandoMorais?
Great! Could yout post your Procfile content?
@FernandoMorais
web: slc run
BTW .. when I select the path from the path dialog to be my repository name (the root) it is not selected and still the path is empty
As a best practice I recommend you to create a "Copy and Publish Build Artifacts" or "Gulp" task that generates a "dist" folder, and then use that "dist" folder on Push Root.
I recommend you to use Push To Heroku task on Release workflows, in that way you can push the same build output to different Heroku apps (which could be "stage" and "production" environments).
Just in case... If you want do push all your repository (something I would not recommend) you can set your Push Root to $(angent.builddirectory). Please, let me know if this solution worked. :)
Regards, Fernando
Thank you. I am trying it ..
In some cases you can't do dist folder like in case of strongloop project which has specific folder structure and it must be sent as it is.
@FernandoMorais Still error
Copying files from 'C:\a\1\s\$(angent.builddirectory)'
Cannot find path 'C:\a\1\s\$(angent.builddirectory)' because it does not exist.
Files copied
Writing .gitignore file
Could not find a part of the path 'C:\a\1\s\$(angent.builddirectory)\.gitignore'.
.gitignore written
Initializing git config
git config --local user.name ""
git config --local user.email "vsts@[MY_APPLICATION_NAME].git.heroku.com"
Git config initialized
Adding files
git add .
[git] fatal: Not a git repository (or any of the parent directories): .git
******************************************************************************
Finishing task: PushToHeroku
******************************************************************************
Task PushToHeroku failed. This caused the job to fail. Look at the logs for the task for more details.
******************************************************************************
Please, set the "system.debug" variable to "true", that will let us to see a verbose log for the task. It will help us to find exactly where is the problem.
@ahmed-abdulmoniem I've tested on Build workflow and the task will not work because of lack of some environment variables used during the execution. You must use a Release workflow instead.
Use a "Copy and Publish Build Artifacts" to create a "drop" folder:
And then on Release workflow configure the Push to Heroku task as follows:
@FernandoMorais You mean I must use the Release management component not TFS build?
Yes! By design, the task depends on Release environment variables, that are not present on Build workflows.
BTW, it is a best practice since you could target multiple Heroku Apps with the same build output, creating stage and production environment/apps. :)
OK thank you. I will try the new release management component.
OK! Let me know if it works!
Sure
Hi @ahmed-abdulmoniem!
Just to follow up, did it work ok?
Still didn't setup the release management component @FernandoMorais
Hi @ahmed-abdulmoniem! Did you try using release management?
I have been able to make it working using release management
But ... I am facing the same as this: https://github.com/BoostingMy/vsts-heroku-tasks/issues/2
@FernandoMorais ?
Hi @ahmed-abdulmoniem, I'll close this issue and solve the new problem described at #2!
I don't understand property PushRoot!
How to pass it?
I have added . and / ... both failed!
And the dialog of the path which appears when I click on the three dots button, only allows me to select a file under my repository but not the repository its self?!