appService.zipIgnorePattern How to ignore a file in a subfolder? - visual-studio-code

I am currently publishing a python web application from VSCODE to an MS Azure App Service.
I have a subfolder that contains a rather large SQLite.db which I would like to exclude when publishing to Azure: "\instance\Output.db"
I have tried the following - see last entry to exclude Output.db but it does not exclude the file. How do I input the subfolder and .db file in this zipIgnorePattern to exclude the file?
"appService.zipIgnorePattern": [
"__pycache__{,/**}",
"*.py[cod]",
"*$py.class",
".Python{,/**}",
"build{,/**}",
"develop-eggs{,/**}",
"Output.db{,/**}"
],

Related

Replace values in multiple appsettings files stored in different artifacts during VSTS Release pipeline

I am trying to replace appsettings.json and e2e-appsettings.json variables stored in two different artifacts in the release pipeline.
As per below code, ONLY appsettings.json is updating, but for the second line it gives an error,
error: NO JSON file matched with specific pattern: e2e/XXX.EndToEnd.Integration.Tests/e2e-appsettings.json
As per the information it should be the relative path to root. So in this case not sure what should be the root as there are two build artifacts.
Further in download artifact logs says,
2019-04-09T02:33:55.9132583Z Downloaded e2e/XXX.EndToEnd.Integration.Tests/e2e-appsettings.json to D:\a\r1\a\EstimationCore\e2e\XXX.EndToEnd.Integration.Tests\e2e-appsettings.json
The artifact with other appsettings.json file which is working fine is a zip file. logs, Downloading app/app.zip to D:\a\r1\a\EstimationCore\app\app.zip
These I have already tried which gave the same error
- NO JSON file matched with specific pattern: e2e/XXX.EndToEnd.Integration.Tests/e2e-appsettings.json.
- NO JSON file matched with specific pattern: **/*e2e-appsettings.json
- NO JSON file matched with specific pattern: d:\a\r1\a\EstimationCore\e2e\XXX.EndToEnd.Integration.Tests\e2e-appsettings.json.
- NO JSON file matched with specific pattern: d:\a\r1\a\EstimationCore\**\**\e2e-appsettings.json.

Directory not notified as modified when a file is deleted

Using watchman 4.9.0 with inotify.
I am subscribed as 'subscribe', '/home/meta', 'Buffy', {"expression": ["since", "c:1517100837:2861:1:1"],
"fields": ["name", "exists", "oclock", "ctime_ns", "new", "mode"]}.
When I create a new file in the directory, I get a notification with two entries: one indicates that the directory changed and the other indicates that a new file is available.
PS:. I am talking about creating a file inside a directory inside the root dir. That is, I am monitoring /home/meta, I have a directory /home/meta/test and I create a file /home/meta/test/z. If the file is created inside the "root" dir, I don't get any notification at all about the directory.
When I delete that file, I only get a "exists:false" notification about the deleted file, but I don't see any notification about a change in the directory.
This is important because I am migrating a legacy application to watchman and I am actually observing only directory changes. When a directory changes, I do a "since" request to it to learn about the actual changes. This is not working on deletes.
Suggestions?
Thanks!.

msdeploy skip only web.config root

I'm deploying a website using a package provider with msdeploy and I'm trying to skip only the Web.config root file.
I've got this command but unfortunately it skips any Web.config files not just the root Web.config file that I want. I have read other posts on this forum and different websites about this same issue but it still doesn't work. I don't understand why msdeploy is so complicated to use, it is just ridiculous.
This is the command I'm using:
msdeploy -source:package='"src\Parapa.Website\obj\Test\Package\Parapa.Website.csproj.zip"'
-dest:auto,computerName='http://computer/MSDeployAgentService',username='luis',password='luis',includeAcls='False'
-verb:sync
-disableLink:AppPoolExtension
-disableLink:ContentExtension
-disableLink:CertificateExtension
-setParamFile:""src\Parapa.Website\obj\Test\Package\Parapa.Website.csproj.SetParameters.xml"" -setParam:"IIS Web Application Name"="staging-cm"
-skip:objectName=filePath,absolutePath='.*\\Web.config$'
-enableRule:DoNotDelete
Info: Object filePath (C:\ProgramFiles\TeamCity\buildAgent\work\d29656a51131c443\src\Parapa.Website\obj\Test\Package\PackageTmp\Views\Web.config) skipped
Info: Object filePath (C:\ProgramFiles\TeamCity\buildAgent\work\d29656a51131c443\src\Parapa.Website\obj\Test\Package\PackageTmp\Web.config) skipped due to skip directive 'CommandLineSkipDirective 1'.
Add the root folder to your Regex expression then it should not skip the web.config in the views folder only the root:
-skip:objectName=filePath,absolutePath='.*\\PackageTmp\\Web.config$'
To complement about chief7 mentions about:
-skip:objectName=filePath,absolutePath='.*\\PackageTmp\\Web.config$'
this command works if you are using -enableRule:DoNotDelete, because the web.config will be skipped from the source but will be deleted from the target.
So if you are not using the -enableRule:DoNotDelete, another approach is using the skipAction over the target web.config.
-skip:objectName=filePath,absolutePath='{WebSiteName}\\Web\.config$',skipAction=Update
replace {WebSiteName} by your web site name.
e.g
-skip:objectName=filePath,absolutePath='CommicsTest\\Web\.config$',skipAction=Update

Use WinZip command line to zip files including specifc to level folder

I have a directory structure that looks like this:
Main/Include
Include/header.h
Include/header2.h
Main/Windows
Windows/code
/code/code.css
Windows/bin
/bin/bar.txt
Main/Mac
Mac/code
/code/code.css
Mac/bin
/bin/bar.txt
I want to zip everything up EXCEPT the Mac directory. So essentially I want to have Include and Windows/* in the zip folder like this:
.zip ---
code
code/code.css
bar
bin/bar.txt
Include
Include/header.h
Include/header2.h
My issue is I cannot seem to figure out how to get winzip to zip the include folder w/out include the mac (by doing Main/*)
This is what I am running:
c:\\progra~2\\winzip\\wzzip.exe -rp zip_win.zip Main\Include\\* Main\Windows\\*
Any ideas?

opkg install error - wfopen no such file or directory

I have followed instructions to create an .ipk file, the Packages.gz and host them on a web server as a repo. I have set the opkg.conf in my other VM to point to this repo. The other VM is able to update and list the contents of repositories successfully.
But, when I try to install, I get this message. Can you please describe why I am getting this and what needs to be changed?
Collected errors:
* wfopen: /etc/repo/d1/something.py: No such file or directory
* wfopen: /etc/repo/d1/something-else.py: No such file or directory
While creating the .ipk, I had created a folder named data that had a file structure as /etc/repo/d1/ with the file something.py stored at d1 location. I zipped that folder to data.tar.gz. And, then together with control.tar.gz and 'debian-binary`, I created the .ipk.
I followed instructions from here:
http://bitsum.com/creating_ipk_packages.htm
http://www.jumpnowtek.com/yocto/Managing-a-private-opkg-repository.html
http://www.jumpnowtek.com/yocto/Using-your-build-workstation-as-a-remote-package-repository.html
It is very likely that the directory called /etc/repo/d1/ does not exist on the target system. If you create the folder manually, and try installing again, it probably will not fail. I'm not sure how to force opkg to create the empty directory by itself :/
Update:
You can solve this problem using a preinst script. Just create the missing directories on it, like this:
#!/bin/sh
mkdir -p /etc/repo/d1/
# always return 0 if success
exit 0