Hi Pipeline Experts
I using bitbucket pipeline to build a legacy software that uses "wsgen" tool to build JAX-WS web services.
since the build is done using ant and needs JDK 1.8 , I use an image called "frekele/ant:1.10.3-jdk8"
However this image does not seem to have "wsgen"
ANy suggestions on either if I can install a missing component ( like wsgen in this case) or if I can switch to another image that has ant, jdk 1.8 and wsgen .
Sincere thanks for your help
Yogesh
Hi
I started creating a docker image as suggested by Syahrul.
Just as a last ditch effort, I thought I will check if wsgen does exist on the frekele/ant:1.10.3-jdk8 image itself even though it does not run owing to possible issues with path.
So I ran the frekele/ant:1.10.3-jdk8 docker container locally and navigated through the links to java to lead me to the java bin directory path .
I then looked for wsgen in that directory, and presto I found it in the java bindir. \
I am not sure why in the out of box container the path to java bindir is set by default
Anyways if you like dirty details - this is how I navigated through links to java to get to java bindir
# run docker image
docker run -it frekele/ant:1.10.3-jdk8 bash
# inside docker figure where is java located
type java
# points to /usr/bin/java
ls -l /usr/bin/java
# points to /etc/alternatives/java
ls -l /etc/alternatives/java
# points to /opt/java/bin/java; look for wsgen in the path /opt/java/bin
ls -l /opt/java/bin/wsgen
/opt/java/bin/wsgen -version
# wsgen version "2.2.9"
Thus having determined that java bin dir path was /opt/java/bin and wsgen was in there I did couple of exports in my script in my pipeline as follows
export JAVA_HOME=/opt/java
export PATH=$PATH:$JAVA_HOME/bin
and I was good to go
So the takeaway is - that if you want to dig into the docker image used for build - run the image locally and explore it so you know exactly what to do in your build
Thanks all
G'day, @yogesh_devi
It's best to create your own image using the "frekele/ant:1.10.3-jdk8" image as the base and installing the legacy software "wsgen" in it. Then, upload it to Docker Hub and use that image as your pipeline image. This way, you have your own customisable image when installed without relying on external email.
Check out this guide on how to use Dockerfile to create a custom image
Docker Basics: How to Use Dockerfiles
Regards,
Syahrul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Syahrul,
Thanks a lot for your response - I was about to build a new image - however it occured to me that maybe wsgen exists on the "frekele/ant:1.10.3-jdk8" image and it simply isnt in the path .
So I looked for it and found it
So basically my question is moot now .
I still sincerely appreciate your help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.