Commit 79c23eab authored by Maxym Borodenko's avatar Maxym Borodenko Committed by Matija Obreza
Browse files

[maven-release-plugin] prepare release validator-web-1.1

- Updated README and docker image tags
parent 021592d3
variables:
PRODUCT_VERSION: "1.1"
IMAGE_VERSION: "1.1"
DOCKER_HOST: "genesys1.swarm.genesys-pgr.org"
stages:
......@@ -48,9 +48,17 @@ build:
# Actions
- cp target/*.war docker
- cd docker
- ${DOCKER_CMD} build -t ${CI_REGISTRY_IMAGE}:${PRODUCT_VERSION}-${CI_COMMIT_REF_SLUG} .
- ${DOCKER_CMD} login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- ${DOCKER_CMD} push ${CI_REGISTRY_IMAGE}:${PRODUCT_VERSION}-${CI_COMMIT_REF_SLUG}
- if [ "${CI_COMMIT_REF_SLUG}" = "master" ] ; then
export IMAGE_TAG="${IMAGE_VERSION}";
export IMAGE_EXTRA="latest";
else
export IMAGE_TAG="${IMAGE_VERSION}-${CI_COMMIT_REF_SLUG}";
fi
- "echo Building ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} extra=${IMAGE_EXTRA}"
- ${DOCKER_CMD} build -t ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} .
- echo "$CI_JOB_TOKEN" | ${DOCKER_CMD} login -u gitlab-ci-token $CI_REGISTRY --password-stdin
- if [ "${IMAGE_EXTRA}" != "" ]; then ${DOCKER_CMD} tag ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} ${CI_REGISTRY_IMAGE}:${IMAGE_EXTRA}; ${DOCKER_CMD} push ${CI_REGISTRY_IMAGE}:${IMAGE_EXTRA}; fi
- ${DOCKER_CMD} push ${CI_REGISTRY_IMAGE}:${IMAGE_TAG}
- ${DOCKER_CMD} logout $CI_REGISTRY
dockerize web app:
......@@ -83,8 +91,15 @@ deploy on sandbox:
- DOCKER_CMD=docker
script:
- echo Deploying to server
- if [ "${CI_COMMIT_REF_SLUG}" = "master" ] ; then
export IMAGE_TAG="${IMAGE_VERSION}";
export IMAGE_EXTRA="latest";
else
export IMAGE_TAG="${IMAGE_VERSION}-${CI_COMMIT_REF_SLUG}";
fi
# Actions
- ${DOCKER_CMD} service update --image ${CI_REGISTRY_IMAGE}:${PRODUCT_VERSION}-${CI_COMMIT_REF_SLUG} validator_sandbox
- "echo Deploying ${CI_REGISTRY_IMAGE}:${IMAGE_TAG}"
- ${DOCKER_CMD} service update --image ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} validator_sandbox
environment:
name: sandbox
url: https://sandbox.genesys-pgr.org/validator/
......@@ -111,8 +126,15 @@ deploy on production:
- DOCKER_CMD=docker
script:
- echo Deploying to production
- if [ "${CI_COMMIT_REF_SLUG}" = "master" ] ; then
export IMAGE_TAG="${IMAGE_VERSION}";
export IMAGE_EXTRA="latest";
else
export IMAGE_TAG="${IMAGE_VERSION}-${CI_COMMIT_REF_SLUG}";
fi
# Actions
- ${DOCKER_CMD} service update --image ${CI_REGISTRY_IMAGE}:${PRODUCT_VERSION}-${CI_COMMIT_REF_SLUG} validator_production
- "echo Deploying ${CI_REGISTRY_IMAGE}:${IMAGE_TAG}"
- ${DOCKER_CMD} service update --image ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} validator_production
environment:
name: production
url: https://validator.genesys-pgr.org/
......@@ -8,7 +8,7 @@ The Validator is a website that provides a user interface for
## Running using Docker
```
docker run --rm -i -t --name validator -p 8080:8080 dockerhub.croptrust.org/genesys-pgr/validator:1.0-SNAPSHOT
docker run --rm -i -t --name validator -p 8080:8080 dockerhub.croptrust.org/genesys-pgr/validator:1.1
```
The application will be accessible at <http://DOCKER_HOST:8080/>
......@@ -18,7 +18,7 @@ The application will be accessible at <http://DOCKER_HOST:8080/>
Application listens on `/` context path by default. To run the application on a `/validator` context path you need to provide `CONTEXT_PATH` as environment variable to docker:
```
docker run --rm -i -t -e CONTEXT_PATH=/validator --name validator -p 8080:8080 dockerhub.croptrust.org/genesys-pgr/validator:1.0-SNAPSHOT
docker run --rm -i -t -e CONTEXT_PATH=/validator --name validator -p 8080:8080 dockerhub.croptrust.org/genesys-pgr/validator:1.1
```
The application will be accessible at <http://DOCKER_HOST:8080/validator>
......@@ -28,5 +28,5 @@ The application will be accessible at <http://DOCKER_HOST:8080/validator>
Data is downloaded to `/data/grin` in the container. To keep this between restarts, map a local directory as a container volume on `/data/grin`:
```
docker run --rm -i -t -v `pwd`/taxonomy_data/:/data/grin -e CONTEXT_PATH=/validator --name validator -p 8080:8080 dockerhub.croptrust.org/genesys-pgr/validator:1.0-SNAPSHOT
docker run --rm -i -t -v `pwd`/taxonomy_data/:/data/grin -e CONTEXT_PATH=/validator --name validator -p 8080:8080 dockerhub.croptrust.org/genesys-pgr/validator:1.1
```
......@@ -6,7 +6,7 @@
<packaging>war</packaging>
<artifactId>validator-web</artifactId>
<name>The Validator</name>
<version>1.1-SNAPSHOT</version>
<version>1.1</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......@@ -19,13 +19,12 @@
<jetty.version>9.4.27.v20200227</jetty.version>
<jstl.version>1.2</jstl.version>
<servlet-api.version>4.0.1</servlet-api.version>
<jsp-api.version>2.3.3</jsp-api.version>
<spring.framework.version>5.2.4.RELEASE</spring.framework.version>
<commons-lang3.version>3.3.2</commons-lang3.version>
<genesys-geotools.version>1.1-SNAPSHOT</genesys-geotools.version>
<taxonomy-tools.version>1.3-SNAPSHOT</taxonomy-tools.version>
<genesys-geotools.version>1.1</genesys-geotools.version>
<taxonomy-tools.version>1.3</taxonomy-tools.version>
</properties>
<licenses>
......@@ -57,7 +56,7 @@
<connection>https://gitlab.croptrust.org/genesys-pgr/validator.git</connection>
<developerConnection>scm:git:git@gitlab.croptrust.org:genesys-pgr/validator.git</developerConnection>
<url>scm:git:git@gitlab.croptrust.org:genesys-pgr/validator.git</url>
<tag>HEAD</tag>
<tag>validator-web-1.1</tag>
</scm>
<issueManagement>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment