-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Slickdeals/OPS-10298-update-jira
Ops 10298 update jira
- Loading branch information
Showing
4 changed files
with
81 additions
and
25 deletions.
There are no files selected for viewing
38 changes: 21 additions & 17 deletions
38
.github/workflows/build-tagged-image.yml → .github/workflows/build-dev-image.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,51 @@ | ||
name: Build & Push Docker Image to GitHub | ||
name: Build & Push Jira Development Docker Image to GHCR | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
push: | ||
tags: | ||
- "*.*.*" | ||
branches: | ||
- develop | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
IMAGE_NAME: slickdeals/jira-software | ||
COMMIT_SHA: ${{ github.sha }} | ||
|
||
jobs: | ||
build_image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
- 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 | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
password: ${{ env.GITHUB_TOKEN }} | ||
env: | ||
GITHUB_USER: ${{ github.actor }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata for the Docker image | ||
id: meta | ||
uses: docker/metadata-action@v5.0.0 | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v2 | ||
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: ${{ steps.meta.outputs.tags }} | ||
tags: ${{ env.COMMIT_SHA }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
RELEASE_TAG=${{ vars.RELEASE_TAG }} | ||
BUILD_TAG=${{ vars.DEVELOP_TAG }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build & Push Jira Release Docker Image to GHCR | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: slickdeals/jira-software | ||
COMMIT_SHA: ${{ github.sha }} | ||
|
||
jobs: | ||
build_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 }} | ||
- 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 }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
BUILD_TAG=${{ vars.RELEASE_TAG }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
# Jira Software | ||
|
||
This repo is responsible for creating the Jira Software image used for our on-prem Jira servers. | ||
This repo is responsible for creating the Atlassian Jira Docker image for our internal use. | ||
|
||
There's not a lot going on in repo itself other than defining a Dockerfile and gitlab-ci.yml file for the CI/CD pipeline. | ||
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) | ||
|
||
Set a variable `DEFAULT_RELEASE_TAG` to configure the image version to build. | ||
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. | ||
|
||
Ensure you only use semVer format for the `DEFAULT_RELEASE_TAG` variable, or simply leave it unset to run a build against whatever image is currently present at the `latest` tag from the [upstream Docker Hub repo](https://hub.docker.com/r/atlassian/jira-software/tags?page=1&name=latest) | ||
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. | ||
|
||
|
||
The resulting new image will be automatically saved into this Project's [Container Registry](https://it-gitlab.slickdeals.dev/itops/jira-software/container_registry) and should be pullable with Docker CLI from there. | ||
The resulting image will be pushed to the Slickdeals GHCR for use on our systems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters