Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Transform files with bitbucket pipelines

flibolt February 15, 2021

I want to transform HTML files buring build in my pipeline. Is there a build-in way to do this with Bitbucket Pipelines ? An other solution is to create a program called from scripts that do this task. But it seems a little bit complicated for the purpose. 

Thanks.

1 answer

1 accepted

0 votes
Answer accepted
ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 17, 2021

Hey @flibolt , welcome to the Atlassian Community!

It is a bit hard for me to directly address your question as I don't know what you mean with transforming HTML files.

A - In general you can for sure create a program and call it within your pipeline step script.

B - Alternatively you can look for a container image that already has such a program and then use it in a pipeline step exporting the result via an artifact.

C - The third way to do this is to make use of a pipe which again is a container image incl. the program and its invocation. It is used then within a pipeline step script.

These are three high level options I would see. There is room between them and you can also start with A and if you add the Docker service to a pipeline step, it is also possible to run a command from an image directly.

I personally prefer to start lightly and having the build more or less self-contained with the project. Therefore I have pipelines that are calling scripts within a step-script (instead of having everything in the step-script). These scripts are easy to test apart from a complete pipeline run and therefore easy to integrate. So perhaps depends a bit of point of view whether this is simple or complicated and your mileage may vary.

In case you want to share a bit more, I'm happy to discuss this further.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events