Skip to content

Commit

Permalink
Merge pull request #7 from Slickdeals/develop
Browse files Browse the repository at this point in the history
Merge develop
  • Loading branch information
Wicaeed authored Mar 19, 2024
2 parents ad0fff5 + c088dc4 commit c65ba63
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/build-dev-image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build & Push Jira Development Docker Image to GHCR

on:
workflow_dispatch:
pull_request:
branches:
- develop
Expand All @@ -10,42 +11,44 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: slickdeals/jira-software-dev
COMMIT_SHA: ${{ github.sha }}

jobs:
build_image:
build_jira_dev_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ env.GITHUB_TOKEN }}
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
${{ env.COMMIT_SHA }}
${{ vars.DEVELOP_TAG}}

- name: Build, Tag, and push Docker image
uses: docker/build-push-action@v5
with:
context: ./app
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.COMMIT_SHA }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ vars.DEVELOP_TAG }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA}}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_TAG=${{ vars.DEVELOP_TAG }}
BUILD_TAG=${{ vars.DEVELOP_TAG }}
22 changes: 12 additions & 10 deletions .github/workflows/build-release-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,44 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: slickdeals/jira-software
COMMIT_SHA: ${{ github.sha }}

jobs:
build_image:
build_jira_prod_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ env.GITHUB_TOKEN }}
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
${{ env.COMMIT_SHA }}
${{ vars.RELEASE_TAG}}

- name: Build, Tag, and push Docker image
uses: docker/build-push-action@v5
with:
context: ./app
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.COMMIT_SHA }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ vars.RELEASE_TAG }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA}}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_TAG=${{ vars.RELEASE_TAG }}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Jira Software

This repo is responsible for creating the Atlassian Jira Docker image for our internal use.
This repo is responsible for creating the Atlassian Jira Docker images for our internal use that has been customized with a MySQL ODBC Connector.

There's not a lot going on in repo itself other than defining a Dockerfile and a few GitHub Actions.

## Usage
To build an image for Jira Software, simply trigger a new run of the default pipeline for this repo via the [GitLab UI](https://it-gitlab.slickdeals.dev/itops/jira-software/-/pipelines)
To trigger a build of the Dev Jira Docker Image, make your changes in a branch and open a PR against the develop branch. Check the status of [GH Action](https://github.com/Slickdeals/jira-software/actions/workflows/build-dev-image.yml) and view the output of the job run for your changes.

The image will be built from the Dockerfile in the `app` folder of this repo. There are two images that will be built from these pipelines, an image for use with our Dev environment, and an image for our Production Jira instance.
Once you are happy with your changes, merge your PR into the develop branch. This will trigger a build of the Dev Jira Docker Image and push it to the Slickdeals GHCR.

Once built, the Docker Image will be tagged with the Git Commit SHA and the version of Jira Software that was used to build the image.
Merging your changes against the develop branch will trigger a Push of the Dev Jira Docker Image to the Slickdeals GHCR.

The resulting image will be pushed to the Slickdeals GHCR for use on our systems.
Once changes have been tested against the develop branch, they can be merged into the main branch. This will trigger a build of the Production Jira Docker Image and push it to the Slickdeals GHCR.

0 comments on commit c65ba63

Please sign in to comment.