Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Custom jasper report template #10

Open
kokeksibir opened this issue May 15, 2023 · 3 comments
Open

Feature request: Custom jasper report template #10

kokeksibir opened this issue May 15, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@kokeksibir
Copy link

Hi! Is it possible to extend functionality to use a custom report template?

Archi cli accepts an argument --jasper.template for passing full path to the main.jrxml Jasper Reports template file.

@WoozyMasta
Copy link
Owner

Yes, it's possible, but I don't have time to implement it right now.

Therefore, I will gladly accept PR or wait until there is time to do it.

Might be worth just allowing any additional custom argument to be specified here in

--modelrepository.loadModel "$ARCHI_PROJECT_PATH" "${_args[@]}" &&

@WoozyMasta WoozyMasta self-assigned this May 15, 2023
@WoozyMasta WoozyMasta added the enhancement New feature or request label May 15, 2023
@kokeksibir
Copy link
Author

Hi @WoozyMasta thanks for reply.

I was going to allow custom arguments by modifying this line:

local -a _args=()

into this:

local -a _args=("${@}")

Then I realized that when there are arguments provided to entrypoint, it behaves differently:

https://github.com/WoozyMasta/archimate-ci-image/blob/b38830882aebe5af4b6b85865733aaffd939fff6/entrypoint.sh#LL148C1-L153C3

In order not to break backwards compatibility I've decided not to remove these lines.

For now I modified my gitlab_ci file by adding another script call to generate jasper report, it works fine.

  script:
    - /opt/Archi/entrypoint.sh
    - /opt/Archi/entrypoint.sh --modelrepository.loadModel <project path> --jasper.createReport <project path>/public --jasper.format PDF --jasper.filename <project name> --jasper.title <project name> --jasper.template <project path>/report-template/main.jrxml

But that means it generates jasper report twice. I wanted to keep jasper report generation bc you inject PDF link to HTML page, which is cool.

Any suggestions?

@WoozyMasta
Copy link
Owner

@kokeksibir
Okay, I'll try to find some time this weekend and try to implement it.

But I'm not promising anything yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants