Serve static report in CI/CD

93 Views Asked by At

I am using Bamboo, but it should be similar for other platforma. One of my build plans generates a static website after performing some unit tests, static analysis and so on, with the results and some useful metrics.

There is no POST requests in this website, just GET requests, there is no login or external interactions, just JSON, HTML, CSS and JS that gets served, which is shipped as part of the static website. The way I can view the report locally is by the usual serve command.

I was wondering how can I deploy this stati website to Bamboo CD, so that I can run a pipeline and see the results in the web browser without having to download the static website.

I am looking for some pointers, I am looking at deployment plans right now but I feel lost.

1

There are 1 best solutions below

1
On

I suppose your static content is also an artifact after the build process. You could use Bamboo Deployments, especially the SCP Task where you transfer your artifact to a remote server (apache, nginx, or something like that) and copy it into the /html path.

Maybe you will also need to use an SSH Task where you unzip the artifact if the SCP task doesn't handle it automatically.

You can also set triggers to "after successful build" which deploys your website immediately after your build job