I have the following Dockerfile
FROM myabse
ARG SERVER_CONTEXT_PATH=com-ifx
COPY ./hue-com-ifx-front/target-server-side/com-ifx.war /opt/tomcat/webapps/${SERVER_CONTEXT_PATH}.war
CMD ["/opt/tomcat/bin/catalina.sh", "run"]
When I try build the docker image like this
sudo docker build --build-arg SERVER_CONTEXT_PATH=mywar -t com-ifx:latest
and run the image using sudo docker run -p 8080:8080 com-ifx:latest
The war file copied is mywar.war
I tried to do the same in .drone.yml
docker:
image: plugins/docker
registry: registry.paas.workslan
repo: registry.paas.workslan/ifx-prestaging/com-ifx
build_args:
- SERVER_CONTEXT_PATH=mywar
secrets: [ docker_username, docker_password ]
tags: latest
when:
branch: ticket-*
docker_publish_feature_branch:
image: plugins/docker
registry: registry.paas.workslan
repo: registry.paas.workslan/ifx-prestaging/com-ifx
secrets: [ docker_username, docker_password ]
tags: ${DRONE_COMMIT_BRANCH}
when:
branch: [ticket-*]
But the name of the war is always com-ifx.war
. I want it to be mywar.war
. How should I do in this in .drone.yml