Skip to content

Commit

Permalink
Merge pull request #8 from Slickdeals/OPS-10298-update-jira
Browse files Browse the repository at this point in the history
Fix GH Actions
  • Loading branch information
Wicaeed authored Mar 19, 2024
2 parents 2372f24 + 36f87b4 commit c088dc4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build-dev-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,38 @@ env:
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: ${{ secrets.GITHUB_TOKEN }}

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

- name: Build, Tag, and push Docker image
uses: docker/build-push-action@v5
with:
context: ./app
push: ${{ github.event_name != 'pull_request' }}
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 }}
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/build-release-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,40 @@ env:
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
with:
buildkitd-flags: debug

- 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 c088dc4

Please sign in to comment.