Deploy java apps to jboss from .gitlab-ci.yaml

Hi team,
I am new to Gitlab, Please forgive my basic mistake.
I have java apps I have built the code and got ear now I want to deploy my ear file to JBoss from CICD script (.gitlab-ci.yml).

Following are the script I found to use but since I don’t have access on the server to check their configuration for the below script. such as how they are executing jboss-cli.sh (when I executed this script in my cicd it says jboss-cli.sh not found) , what is hostname, how they have configured ip etc, what are the content of pwd file etc…

deploy-sit:
allow_failure: false
dependencies:
- build-sit
tags:
- sit-gcp-runner
stage: deploy-sit
environment:
name: sit
only:
- branches
except:
- tags
script:
- “jboss-cli.sh --controller=hostname:9999 --connect file=pwd/deployment/undeploy-qq.cmd”
- “unzip -P ${ENCRYPT_PASSWORD} myproject.zip”
- “jboss-cli.sh --controller=hostname:9999 --connect file=pwd/deployment/deploy-qq.cmd”

Kindly help how and what is the configuration I need to do on my server to use the above script to deploy my apps to jboss, or please help me if there is any other and easy way to deploy my apps to jboss from .gitlab-ci.yaml

Thanks

Hi,

I’m wondering where you got the jboss-cli.sh script from. A quick guess would be that this script expects an endpoint controller where it should upload something and the connect-file which instructs on the deployment with the cmd file.

Where did you copy the configuration from? I have rusty Java knowledge, so one of my next questions would be - how do you build and deploy your code without GitLab now - e.g. on your terminal?

Cheers,
Michael

Hi Michael,
Thank you very much for your response.
I got the code from different project of the client but since I don’t have access on those server where cIient used this script to deploy code, I can’t check the jboss-cli.sh content etc.
No, I am not building the code from terminal I am building it from my CICD scripts.
Below is my scripts to build the code, build is passing there is no issue with the build, I need to deploy it now to jboss. I don’t know how.?

Thank you

script:
- “cd ACRA/Code/acra-qq-core”
- “mvn clean install -P sit”
- “cd …/…/…/”
- “zip -P ${ENCRYPT_PASSWORD} acra.zip
ACRA/Code/acra-qq-business/ear/target/acra-qq-business.ear
ACRA/Code/acra-qq-pp/ear/target/acra-qq-pp.ear
ACRA/Code/acra-qq-web/ear/target/acra-qq-web.ear”
- echo “********** BUILD SUCCESSFULL************”