0

I am deploying my laravel app using bitbucket git remote repo as source. It had been working fine, and deployment updated on each commit. But at one specific commit, deployment was failed. Following are the error logs:

deployment_error_logs

From the errors, It is clear that there are some invalid characters in file name, eg, colon. After fixing this error and committing changes, the deployment runs on commit, but ALWAYS fails and shows EXACTLY SAME error log. Important point here is, the name of the file contained current date. if you notice, the log, it is still same today, with old day date when problem first appeared.

I tried changing source branch, changing url, disconnecting and connecting back deployment source, but deployment always fails, showing same error. It gives me feeling like azure has kinda cached/stacked my failed deployment, and always shows error (I don't know as I'm new to it).

Is there anything that I have to do? anything to reset? any option to build or something? I must be missing something. any help/guidance is appreciated, as I am stuck for two days.

Zeeshan
  • 2,884
  • 3
  • 28
  • 47
  • do you have this folders? `public/uploads/videographer/4` ? i doubt that this is the probleme but from my own experience, i had such a probleme fixed by just creating those folders. – Achraf Khouadja Jun 21 '16 at 01:46
  • @AchrafKhouadja I removed this folder manually. Should I recreated it? I don't think it is going to make any difference. as it was already there. I tried deleting it. – Zeeshan Jun 21 '16 at 04:31
  • try to recreate it , that path must exist , go give it a try, i hope it works – Achraf Khouadja Jun 21 '16 at 04:36

2 Answers2

0

I would use git reset to back to the latest working commit (use --soft if you wish to keep your files as they are now, --hard otherwise).

Then try to push. If push succeeds, create a new commit with the fixed files and push again. If push fails, login to the Azure portal, disconnect the Git deployment source and add it again (which will make it start from a clean git repo) and then push your fixed master again.

The important point is that the reset removes the commits containing the troublesome files.

Thibault D.
  • 10,041
  • 3
  • 25
  • 56
  • Where do I run this `git-reset` command? somewhere in azure portal? Otherwise does git know, what was the last working commit? *(I'm a regular TFS user, just new to git world)* – Zeeshan Jun 21 '16 at 09:19
  • When using Git for deployment to Azure, I guess you right-click+publish from VS and publish to a local git repo? Then in this repo you create a commit and push it to azure. When you push your site is deployed. Your local git repo has the history of all your deploys. Unlike TFS, every local copy has a copy of the whole history. So you can list all the commits you made and go back to an older one and let git believe that the future never happened. – Thibault D. Jun 21 '16 at 09:31
  • I know it's confusing when coming from a TFS world, feel free to tell me if there is something you don't understand. – Thibault D. Jun 21 '16 at 09:32
  • Thank you. No I did not create local git repo at azure. Azure also has option to deploy directly from source control. So I deployed from my bitbucket account. In this case, we have to tell azure, which branch to use for deployment. then after each commit to that branch, it is automatically deployed *(aka continues deployment/integration)*. It also maintains history of deployments. – Zeeshan Jun 21 '16 at 10:00
  • But how does the deploy package reach bitbucket then? – Thibault D. Jun 21 '16 at 10:31
  • it asks to authenticate the source while configuration. Azure has options for bitbucket, Github, VS Online, etc. Once authentication is done, deployment source is configured, pointing to mentioned branch – Zeeshan Jun 21 '16 at 10:38
0

It was happening just due to my careless branch management, as I am new to git. I just noticed, these files were physically present in my master branch, though I have removed the code that generates this. Removing files from branch fixed the problem

Zeeshan
  • 2,884
  • 3
  • 28
  • 47