# How to set up CI/CD for Jira Server plugin with Github Actions?

**URL:** <https://community.developer.atlassian.com/t/how-to-set-up-ci-cd-for-jira-server-plugin-with-github-actions/36799>\
**Category:** Everything Else\
**Tags:** automated-testing, github-actions, plugin-development, jira-server\
**Created:** [March 24, 2020, 6:35pm UTC](https://community.developer.atlassian.com/t/how-to-set-up-ci-cd-for-jira-server-plugin-with-github-actions/36799 "2020-03-24T18:35:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaciejWikira](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@MaciejWikira](https://community.developer.atlassian.com/u/MaciejWikira)\
**Post date:** [March 24, 2020, 6:35pm UTC](https://community.developer.atlassian.com/t/how-to-set-up-ci-cd-for-jira-server-plugin-with-github-actions/36799/1 "2020-03-24T18:35:21Z")

</div>

Hello.

I want to use Github Actions to set up a CI/CD pipeline for my Jira plugin. I’ve lately managed to make unit tests run with maven surfire so I’ve tried adding a simple action that would run them, but it ends up throwing an error at build step:

```auto
[INFO] Scanning for projects...
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/atlassian/maven/plugins/jira-maven-plugin/8.0.2/jira-maven-plugin-8.0.2.pom
[WARNING] The POM for com.atlassian.maven.plugins:jira-maven-plugin:jar:8.0.2 is missing, no dependency information available
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/atlassian/maven/plugins/jira-maven-plugin/8.0.2/jira-maven-plugin-8.0.2.jar
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar (169 kB at 1.7 MB/s)
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin com.atlassian.maven.plugins:jira-maven-plugin:8.0.2 or one of its dependencies could not be resolved: Could not find artifact com.atlassian.maven.plugins:jira-maven-plugin:jar:8.0.2 in central (https://repo.maven.apache.org/maven2) @ 
[ERROR] Unknown packaging: atlassian-plugin @ line 14, column 16
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR] The project com.tiramisu:jira-scrum-demo:1.0.0-SNAPSHOT (/home/runner/work/FUBARio_ActionableInsights/FUBARio_ActionableInsights/pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin com.atlassian.maven.plugins:jira-maven-plugin:8.0.2 or one of its dependencies could not be resolved: Could not find artifact com.atlassian.maven.plugins:jira-maven-plugin:jar:8.0.2 in central (https://repo.maven.apache.org/maven2) -> [Help 2]
[ERROR] Unknown packaging: atlassian-plugin @ line 14, column 16
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
##[error]Process completed with exit code 1.

```

I guess this is expected, as even in IntelliJ I need to set maven to version provided with the Atlassian SDK to make it all work.

**So I have a question : does anyone here know how to set up Atlassian SDK along with properly configuring maven version on Github Actions ?** For now I want just to make the unit tests work, but in the future I would like to be able to use `atlas-run` to bring up a Jira instance to run integration tests against.

Thank you kindly in advance for any input on this matter.  
Cheers.

---

<div class="post-metadata">

**Author:** ![remie](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/remie/32/34985_2.png) [@remie](https://community.developer.atlassian.com/u/remie)\
**Post date:** [March 24, 2020, 8:21pm UTC](https://community.developer.atlassian.com/t/how-to-set-up-ci-cd-for-jira-server-plugin-with-github-actions/36799/2 "2020-03-24T20:21:53Z")

</div>

I would look into creating your own Docker container for running GitHub actions: [Creating a Docker container action - GitHub Docs](https://help.github.com/en/actions/building-actions/creating-a-docker-container-action)

---

<div class="post-metadata">

**Author:** ![MaciejWikira](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@MaciejWikira](https://community.developer.atlassian.com/u/MaciejWikira)\
**Post date:** [March 27, 2020, 4:51pm UTC](https://community.developer.atlassian.com/t/how-to-set-up-ci-cd-for-jira-server-plugin-with-github-actions/36799/3 "2020-03-27T16:51:28Z")

</div>

Thank you @remie . I’ve looked into it and succeeded in building an github action that runs my JIRA plugin unit and integration tests inside a specialized docker container.

If anyone is interested in seeing the code please message me directly.

Cheers.

---

<div class="post-metadata">

**Author:** ![remie](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/remie/32/34985_2.png) [@remie](https://community.developer.atlassian.com/u/remie)\
**Post date:** [March 28, 2020, 4:49pm UTC](https://community.developer.atlassian.com/t/how-to-set-up-ci-cd-for-jira-server-plugin-with-github-actions/36799/4 "2020-03-28T16:49:46Z")

</div>

Can I persuade you to consider open sourcing or publishing the GitHub action for use by the Atlassian Ecosystem community?

---

<div class="post-metadata">

**Author:** ![MaciejWikira](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@MaciejWikira](https://community.developer.atlassian.com/u/MaciejWikira)\
**Post date:** [April 16, 2020, 3:16pm UTC](https://community.developer.atlassian.com/t/how-to-set-up-ci-cd-for-jira-server-plugin-with-github-actions/36799/5 "2020-04-16T15:16:10Z")

</div>

I will look into it when I have some spare time. Also as this is something I developed on company time and resources I think I’ll have to check with my supervisors if this is okay.

---

<div class="post-metadata">

**Author:** ![MaciejWikira](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@MaciejWikira](https://community.developer.atlassian.com/u/MaciejWikira)\
**Post date:** [April 24, 2020, 1:28pm UTC](https://community.developer.atlassian.com/t/how-to-set-up-ci-cd-for-jira-server-plugin-with-github-actions/36799/6 "2020-04-24T13:28:23Z")

</div>

Hello.

So I’ve found some time to work on what you have requested regarding publishing a Github Action for Atlassian Community.

I’ve checked with my supervisors and they have agreed to publish this as open source. So here you are : [GitHub - tirasu/jira-test-action](https://github.com/tirasu/jira-test-action)

This is really a very simple thing, it just sets up a container with latest Java JDK, Atlassian SDK 8.0.16 and your repository code and runs `mvn test` & `mvn integration-test`. For now I have confirmed it to work with the project I’ve originally developed it for. I haven’t tested it any further yet. It probably can be optimized and improved in various ways - for example adding support for using chosen version of Java and Atlassian SDK.

Please bear in mind that I’m no expert when it comes to Github Actions, Docker, Maven and so on - I’m on a junior-dev level. Therefore any contributions and advices are welcome 🙂

---

<div class="post-metadata">

**Author:** ![anon21029823](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@anon21029823](https://community.developer.atlassian.com/u/anon21029823)\
**Post date:** [April 24, 2020, 2:04pm UTC](https://community.developer.atlassian.com/t/how-to-set-up-ci-cd-for-jira-server-plugin-with-github-actions/36799/7 "2020-04-24T14:04:31Z")

</div>

That’s super cool! Thanks for sharing @MaciejWikira ! 🙂

---

<div class="post-metadata">

**Author:** ![marc](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/marc/32/39047_2.png) [@marc](https://community.developer.atlassian.com/u/marc)\
**Post date:** [April 24, 2020, 2:38pm UTC](https://community.developer.atlassian.com/t/how-to-set-up-ci-cd-for-jira-server-plugin-with-github-actions/36799/8 "2020-04-24T14:38:21Z")

</div>

Hi @MaciejWikira Thanks for sharing!
