Skip to content

Commit

Permalink
Merge branch 'develop' into feature/SUPP0RT-1109_user_tenants_commands
Browse files Browse the repository at this point in the history
  • Loading branch information
turegjorup authored Jul 11, 2023
2 parents c1d5319 + 0fe2eb2 commit 60883aa
Show file tree
Hide file tree
Showing 40 changed files with 707 additions and 112 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/github_build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
push:
tags:
- '*.*.*'

name: Create Github Release

permissions:
contents: write

jobs:
create-release:
runs-on: ubuntu-latest
env:
COMPOSER_ALLOW_SUPERUSER: 1
APP_ENV: prod
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Composer install
run: |
docker network create frontend
docker compose run --rm phpfpm composer install --no-dev -o --classmap-authoritative
docker compose run --rm phpfpm composer clear-cache
rm -rf infrastructure
- name: Make assets dir
run: |
mkdir -p ../assets
- name: Create archive
run: |
tar \
-zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./*
- name: Create checksum
run: sha256sum ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt

- name: Create a release in GitHub and uploads assets
run: |
gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.*
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ on:
push:
branches:
- 'develop'
name: Build docker image (develop)

# This Action builds to itkdev/* using ./infrastructure/itkdev/*
name: ITK Dev - Build docker image (develop)

jobs:
docker:
runs-on: ubuntu-latest
env:
APP_VERSION: develop
COMPOSER_ALLOW_SUPERUSER: 1
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -30,8 +33,8 @@ jobs:
- name: Build and push (API)
uses: docker/build-push-action@v4
with:
context: ./infrastructure/display-api-service/
file: ./infrastructure/display-api-service/Dockerfile
context: ./infrastructure/itkdev/display-api-service/
file: ./infrastructure/itkdev/display-api-service/Dockerfile
build-args: |
VERSION=${{ env.APP_VERSION }}
push: true
Expand All @@ -48,8 +51,8 @@ jobs:
- name: Build and push (Nginx)
uses: docker/build-push-action@v4
with:
context: ./infrastructure/nginx/
file: ./infrastructure/nginx/Dockerfile
context: ./infrastructure/itkdev/nginx/
file: ./infrastructure/itkdev/nginx/Dockerfile
build-args: |
APP_VERSION=${{ env.APP_VERSION }}
push: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ on:
push:
tags:
- '*'
name: Build docker image (tag)

# This Action builds to itkdev/* using ./infrastructure/itkdev/*
name: ITK Dev - Build docker image (tag)

jobs:
docker:
runs-on: ubuntu-latest
env:
COMPOSER_ALLOW_SUPERUSER: 1
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -28,8 +32,8 @@ jobs:
- name: Build and push (API)
uses: docker/build-push-action@v4
with:
context: ./infrastructure/display-api-service/
file: ./infrastructure/display-api-service/Dockerfile
context: ./infrastructure/itkdev/display-api-service/
file: ./infrastructure/itkdev/display-api-service/Dockerfile
build-args: |
APP_VERSION=${{ github.ref }}
push: true
Expand All @@ -50,8 +54,8 @@ jobs:
- name: Build and push (Nginx)
uses: docker/build-push-action@v4
with:
context: ./infrastructure/nginx/
file: ./infrastructure/nginx/Dockerfile
context: ./infrastructure/itkdev/nginx/
file: ./infrastructure/itkdev/nginx/Dockerfile
build-args: |
APP_VERSION=${{ steps.get_tag.outputs.git_tag }}
push: true
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/os2display_docker_build_develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
on:
push:
branches:
- 'develop'

# This Action builds to os2display/* using ./infrastructure/os2display/*
name: OS2display - Build docker image (develop)

jobs:
docker:
runs-on: ubuntu-latest
env:
APP_VERSION: develop
COMPOSER_ALLOW_SUPERUSER: 1
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Build api
- name: Docker meta (API)
id: meta-api
uses: docker/metadata-action@v4
with:
images: os2display/display-api-service

- name: Build and push (API)
uses: docker/build-push-action@v4
with:
context: ./infrastructure/os2display/display-api-service/
file: ./infrastructure/os2display/display-api-service/Dockerfile
build-args: |
VERSION=${{ env.APP_VERSION }}
push: true
tags: ${{ steps.meta-api.outputs.tags }}
labels: ${{ steps.meta-api.outputs.labels }}

# Build nginx (depends on api build)
- name: Docker meta (Nginx)
id: meta-nginx
uses: docker/metadata-action@v4
with:
images: os2display/display-api-service-nginx

- name: Build and push (Nginx)
uses: docker/build-push-action@v4
with:
context: ./infrastructure/os2display/nginx/
file: ./infrastructure/os2display/nginx/Dockerfile
build-args: |
APP_VERSION=${{ env.APP_VERSION }}
push: true
tags: ${{ steps.meta-nginx.outputs.tags }}
labels: ${{ steps.meta-nginx.outputs.labels }}
63 changes: 63 additions & 0 deletions .github/workflows/os2display_docker_build_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
on:
push:
tags:
- '*'

# This Action builds to os2display/* using ./infrastructure/os2display/*
name: OS2display - Build docker image (tag)

jobs:
docker:
runs-on: ubuntu-latest
env:
COMPOSER_ALLOW_SUPERUSER: 1
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Build api
- name: Docker meta (API)
id: meta-api
uses: docker/metadata-action@v4
with:
images: os2display/display-api-service

- name: Build and push (API)
uses: docker/build-push-action@v4
with:
context: ./infrastructure/os2display/display-api-service/
file: ./infrastructure/os2display/display-api-service/Dockerfile
build-args: |
APP_VERSION=${{ github.ref }}
push: true
tags: ${{ steps.meta-api.outputs.tags }}
labels: ${{ steps.meta-api.outputs.labels }}

# Build nginx (depends on api build)
- name: Docker meta (Nginx)
id: meta-nginx
uses: docker/metadata-action@v4
with:
images: os2display/display-api-service-nginx

- name: Get the tag
id: get_tag
run: echo ::set-output name=git_tag::$(echo $GITHUB_REF_NAME)

- name: Build and push (Nginx)
uses: docker/build-push-action@v4
with:
context: ./infrastructure/os2display/nginx/
file: ./infrastructure/os2display/nginx/Dockerfile
build-args: |
APP_VERSION=${{ steps.get_tag.outputs.git_tag }}
push: true
tags: ${{ steps.meta-nginx.outputs.tags }}
labels: ${{ steps.meta-nginx.outputs.labels }}
6 changes: 4 additions & 2 deletions .github/workflows/php_upgrade.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
on: pull_request
name: Upgrade
name: PHP Upgrade Check
jobs:
test-composer-install:
runs-on: ubuntu-latest
env:
COMPOSER_ALLOW_SUPERUSER: 1
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -91,7 +93,7 @@ jobs:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:latest
image: mariadb:lts
ports:
- 3306
env:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
on: pull_request
name: Review
name: Pull Request Review
jobs:
test-composer-install:
runs-on: ubuntu-latest
env:
COMPOSER_ALLOW_SUPERUSER: 1
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -141,7 +143,7 @@ jobs:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:latest
image: mariadb:lts
ports:
- 3306
env:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.

## [Unreleased]
- Update docker build to publish to "os2display" org on docker hub. Update github workflow to latest actions.
- Set up separate image builds for itkdev and os2display
- Updated `EventDatabaseApiFeedType` query ensuring started
but not finished events are found.
- Refactored all feed related classes and services
Expand Down
28 changes: 0 additions & 28 deletions docker-compose.dev.yml

This file was deleted.

17 changes: 0 additions & 17 deletions docker-compose.redirect.yml

This file was deleted.

48 changes: 0 additions & 48 deletions docker-compose.server.yml

This file was deleted.

Loading

0 comments on commit 60883aa

Please sign in to comment.