Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
# Unique Regex Custom Field

Custom field that based on text field and allows to match "regular expression" and/or check uniqueness of custom field from JQL.

## Build application

Build application from source code.
**Requirements**
- JAVA 1.8
- Git
- Atlassian SDK

1. Install [Atlassian Plugin SDK](https://developer.atlassian.com/server/framework/atlassian-sdk/set-up-the-atlassian-plugin-sdk-and-build-a-project/)
2. Download the current source code
3. Open cmd.exe 'Windows'|bash 'Linux', go to the direcory with pom.xml and run atlas-package
4. Compiled jar file will be placed in direcory unique-regex-custom-field\target\uniqueregexfield-'version'.jar

## Test application

Build and deploy application. JIRA server will be with development license, bind port 2990 by default.
**Requirements**
- The same as in build plus 2GB memory

1. Install [Atlassian Plugin SDK](https://developer.atlassian.com/server/framework/atlassian-sdk/set-up-the-atlassian-plugin-sdk-and-build-a-project/)
2. Download the current source code
3. Open cmd.exe 'Windows'|bash 'Linux', go to the direcory with pom.xml and run atlas-run -u 6.3.21
4. Open JIRA server by [link](http://localhost:2990/jira/). Login name - admin, password - admin

## Start Jira server with plugin in docker

Dockerfile placed in directory docker in the current repository.
Start Jira server with plugin in docker container:
1. Download image: 'docker pull andrewdvizhok/demo-jira:1.0'
2. Run container: 'docker run -t -p 2990:80 -i andrewdvizhok/demo-jira:1.0 /bin/bash'
3. In the docker go to directory /unique-regex-custom-field
4. Run command to start jira server: 'atlas-run -u 6.3.21 -p 80'
5. Run command to build plugin: 'atlas-package'
11 changes: 11 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Dockerfile
# base image
FROM centos:centos8

COPY artifactory.repo /etc/yum.repos.d/
RUN yum clean all &&\
yum updateinfo metadata &&\
yum install -y java-1.8.0-openjdk-devel.x86_64 git atlassian-plugin-sdk &&\
cd / && git clone https://github.com/AndreyVMarkelov/unique-regex-custom-field.git

ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
5 changes: 5 additions & 0 deletions docker/artifactory.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Artifactory]
name=Artifactory
baseurl=https://packages.atlassian.com/yum/atlassian-sdk-rpm/
enabled=1
gpgcheck=0
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ru.mail.jira.plugins</groupId>
<artifactId>uniqueregexfield</artifactId>
<version>1.2.26-jira8</version>
<version>1.2.27-jira8</version>
<packaging>atlassian-plugin</packaging>

<organization>
Expand All @@ -26,7 +26,7 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.3</version>
<version>2.5</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -51,7 +51,7 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand All @@ -61,9 +61,9 @@
</build>

<properties>
<jira.version>8.0.0</jira.version>
<jira.version>8.14.0</jira.version>
<jira.data.version>${jira.version}</jira.data.version>
<amps.version>6.3.15</amps.version>
<amps.version>6.3.21</amps.version>
<useFastdevCli>false</useFastdevCli>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand Down