Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ngCry3162yIt doesn't need to happen if the deploy stage is not needed but it somehow feels like the responsibility of the build
-
p100sch15002yWhat is the thing that gets deployed? The uncompressed files? Then it is purely a deploy step. If you deploy it and it stays compressed. Then it might be the build.
That's just my opinion. -
So long as it's automated and fault-tolerant, sure why not
I for one don't really care about the distinction -
Anyway, IMO the difference between build and pre-deploy is which tool automates the given task. If it's the build system, it's a build task. If it's the deploy script or the CD pipeline separately, it's a pre-deploy task.
-
Depends on where the bottleneck is. Under normal circumstances I don't bother with it at all.
Is it slow to upload or download build artifacts? Zip the files in the build pipeline before you publish them.
Is it slow to deploy your files on the target? Zip the files in the deployment pipeline before you transfer them. -
First question....
When do you apply environment specifics?
If you generate assets with an environment specific configuration in the build step - which is usually seen as an anti pattern - then you _could_ do it in the build step.
If you modify the assets to apply environment specific configuration before deployment / on container start, it would be bad to gzip it.
Another question: Do you need to GZIP it? If you have e.g. an caching server like Varnish, a WAF like cloudflare or stuff like that - it would be a far better idea to leave it to them to handle compression... After all, they are the ones who need to deal with the cache fuckity and who directly know from the client what the client supports and how to cater for it (e.g. supporting different compression types for better results). -
ngCry3162y@IntrusionCM Thank you for the answer.
Under normal circumstances that would be absolutely the way to go, however im using Gitlab Pages to host a page with a SSG (just a toy project) and to have any compression at all, the static files have to compresed already thats why I can't do it the "normal" way
Related Rants
Would you consider compression (gzip static files) as a prepare step of the deploy stage or as a part of the build stage?
It's somewhat irrelevant but its bugging me
question
ci
devops