Do pipelines cache system support cache keys?
In my project build process, I have many assets to be built by web pack. Resulting assets are copied to public/build directory. That process can take several minutes to complete.
So I would like to generate a hash of the assets directory content (the one from which web pack is building) and store a cache with for example "assets-{assets-directory-hash}" as a key and the public/build directory as a cache container.
Then in a next build if assets directory content hash didn't change it would mean that assets didn't change, and I could skip web pack building step, restore public/build directory from the cache, and save few minutes of the entire build as a result. If hash did change, then I would run web pack as usual, and store cache with a new key.
Thanks.
Related
I would like to enable development of a Kotlin project on a machine that, for security reasons, does not have a network connection. Both the source and target machines are Windows. I would like to transport the .gradle directory from my home directory, with all the build depencies cached, onto this offline machine, but I discovered the that the .gradle is enormous, like 3-4GB. I am also required to do a virus scan which, again, is for security reasons and it takes forever.
I would like to figure out if there are any files/directories in my .gradle which, perhaps, were downloaded as intermediary steps to set up Gradle but are no longer needed. Are there any of significant size that I could delete and an offline build would still work?
In our TeamCity deployment, we have used S3 Artifacts Storage to store build artifacts in S3 as they are built. This is very useful as we get to leverage the stability of S3 to store and restore these files should TeamCity need to be re-deployed.
I was wondering if there is a similar way to store the hidden artifacts of a build, i.e. build logs, build settings, etc in S3 in the same manner? These hidden artifacts accumulate to thousands or hundreds of thousands of files, and also log files can be particularly large. Having to copy these files to a fresh TeamCity deployment can make the restore time very long, more than 12 hours.
It would be great if these files, or at the least, the build logs, could be stored in S3 and cached on the TeamCity server as necessary based on user request. Any ideas of whether this can or has been done?
Context:
Currently we manually get a git dev branch built into a package into VSO, and once that package is built it deploys to Octopus and takes down the site for a good amount of time as all the built packages are loaded into each server the site sits on... But, honestly, a lot of the bug fixes end up being in js files that could easily just be hot swapped in... and it's just so annoying to have to wait for poor OPs and support to do all of this just for a teensy tiny change.
The pipedream:
I would like to set up CI that allows hot swapping of js,css,cshtml,html files to VSO and Octopus... This will allow small petty changes in javascript files to be issued out fast and without deployments...
...and also have another option that allows me to say, "look, i've changed some csharp files so i need a built package to be pushed up into VSO and Octopus". A manual rebuild if you will.
Question:
I'm missing the vocabulary to search for this in Google and wondered if you guys can help me on a path to setting this up.
You can just include the modified files (remain folder structure) in the package, then push this package to Octopus server and deploy with this package, then the necessary files will be replaced.
My workflow of IIS deploy:
New Deployment Target with Listening tentacle mode
Add Deploy to IIS process template for Octopus project
Enable Custom installation directory feature in Configure Features window of Process
Specify Custom Install Directory path in process
Build tasks:
Add Copy Files task to copy necessary files (e.g. js)
Add Package Application task to package these files (remain folder structure)
Add Push Packages to Octopus task
Add Create Octopus Release task
On the other hand, you can include all published files to package (tested with File System publish), then deploy with that package, the Octopus can compare files and just replace the modified files ({webapp}.dll will be replaced too, checked the Created, Modified time on target server)
Regarding get changed files during build, you can call Get commit with Changed items REST API, then create/modify the build variable (e.g. depAll) through Logging Command (e.g. PS: Write-Host "##vso[task.setvariable variable=depAll];]Yes") per to the changed files result, then using this variable in task condition (Control Options of each task) to determine which tasks need to be run. Specify conditions for running a task
I am having a MDHA Project and I am deploying to Devices and to the Web.
Is it possible (like in usual VS Projects) to have an custom Config, which calls a batch script on anything like this to publish the files on a file System?
Actually when i create a custom Config, it will also try to deploy it as an APP.
Thanks Markus
If I understand your question correctly, you want to use the same set of web assets (HTML, CSS, Javascript. etc.) to build both a hybrid app and a web site. I have a similar situation where my assets are part of an existing ASP.NET project.
I created a companion MDHA project and reused the assets by adding a target & task to the MDHA project file that copies the assets from the ASP.NET project to the MDHA project directory. Even though the assets are not part of the MDHA project definition (i.e., they are not present as items in the project file), this approach works because MDHA looks for files under the project directory on disk.
Of course, all of this depends on having web assets that are available at build-time.
I am suing VS 2005 and a Web Deployment project. The problem is that the build process takes a very long time because the deployment process copies my images folder to the deployment directory. The images folder is small in size but has thousands of files. I want to keep the images in my development folder so that I can see if the linking to the images in the HTML works. However I never upload the images because they are already there. So I am ideally wanting to exclude that folder from the deployment process.
Is there a easy way to do this?
This SO post mentions an addin (Web Deployment addin) that should allow you to exclude items from the build process.
You can also go about excluding items by manually editing the Web Deployment project file. Look under the Customizing Web Deployment Projects heading here...
http://msdn.microsoft.com/en-us/library/aa479568.aspx