Local Jira deployment testing

GitLab integrates with multiple Jira deployment types. When testing Jira integrations, you might need to replicate these environments locally:

Jira Cloud

Atlassian provides free instances for development and testing.

For authentication, create a Jira Cloud API token.

Jira Data Center

Atlassian provides download archives for all versions. For quick local testing, use this Docker Compose configuration:

yaml
# docker-compose.yaml
services:
  jira:
    image: atlassian/jira-software:11.3 # most recent LTS version
    container_name: jira
    ports:
      - "8080:8080"
    environment:
      - ATL_PROXY_NAME=localhost
      - ATL_PROXY_PORT=8080
      - ATL_TOMCAT_SCHEME=http
      - ATL_JDBC_URL=jdbc:postgresql://postgres:5432/jiradb
      - ATL_JDBC_USER=jira
      - ATL_JDBC_PASSWORD=${JIRA_DB_PASSWORD}
      - ATL_DB_TYPE=postgres72
      - ATL_DB_DRIVER=org.postgresql.Driver
      - JVM_MINIMUM_MEMORY=1024m
      - JVM_MAXIMUM_MEMORY=2048m
    volumes:
      - jira-data:/var/atlassian/application-data/jira
    depends_on:
      - postgres
    networks:
      - atlassian

  postgres:
    image: postgres:14
    container_name: jira-postgres
    environment:
      - POSTGRES_DB=jiradb
      - POSTGRES_USER=jira
      - POSTGRES_PASSWORD=${JIRA_DB_PASSWORD}
    volumes:
      - postgres-data:/var/lib/postgresql/data
    networks:
      - atlassian

volumes:
  jira-data:
  postgres-data:

networks:
  atlassian:
    driver: bridge

Create a .env file with your database password:

JIRA_DB_PASSWORD=<JIRA_DB_PASSWORD>

Setup steps

  1. Start the containers: docker-compose up -d.
  2. In your browser, go to http://localhost:8080.
  3. Complete the initial setup wizard to configure your instance name and URL.
  4. Get a short-lived license from Atlassian’s developer documentation site, such as the 10 user Jira Software Data Center license, expires in 3 hours key.
  5. Create an administrator account.
  6. Create a basic software development project, and populate it with example issues in various states.

Authentication for GitLab integration

Use either the administrator username/password or generate a personal access token in Jira.