Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Add Master to Develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mamutmk5 committed Jun 25, 2021
2 parents 8b69b0a + 59f4cfa commit a5ed008
Show file tree
Hide file tree
Showing 19 changed files with 469 additions and 311 deletions.
98 changes: 77 additions & 21 deletions .github/workflows/build-and-push-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,88 @@ name: Build and push Docker image

on:
push:
branches:
branches-ignore:
- main
- master
- develop
- feature/*
- release/*
- hotfix/*
tags:
- '[0-9]*'

pull_request:
- dependabot/*

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
redis-version: [5]
steps:
- name: Git checkout
uses: actions/checkout@v1
- name: Start Mailcatcher
run: docker run --name mailcatcher --publish 1025:1025 --detach schickling/mailcatcher
- name: Start MongoDB
uses: supercharge/[email protected]
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build
- run: npm test
env:
CI: true

build_and_push:
needs:
- test
runs-on: ubuntu-18.04
if: (contains(github.event.head_commit.message, '[skip ci]') == false) && (github.event_name == 'push')
steps:
- uses: actions/checkout@v2


- name: Docker meta Service Name
id: docker_meta_img
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch,enable=false,priority=600
type=sha,enable=true,priority=600,prefix=
- name: Log into registry
run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin

- name: Build image
run: make build

- name: Push image
run: make push

- name: Cleanup
run: make clean
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GH_DOCKER_USERNAME }}
password: ${{ secrets.GH_DOCKER_TOKEN }}

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

- name: Build and push ${{ github.repository }}
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}
labels: ${{ steps.docker_meta_img.outputs.labels }}

dispatch:
runs-on: ubuntu-latest
needs:
- build_and_push
steps:
- uses: actions/checkout@v2
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: hpi-schul-cloud/dof_app_deploy
event-type: dev-deploy
client-payload: '{"branch": "${{ steps.extract_branch.outputs.branch}}" }'
72 changes: 72 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
name: Build and push Docker Image on Main

on:
push:
branches:
- main
- master

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
redis-version: [5] # [4, 5]
steps:
- name: Git checkout
uses: actions/checkout@v1
- name: Start Mailcatcher
run: docker run --name mailcatcher --publish 1025:1025 --detach schickling/mailcatcher
- name: Start MongoDB
uses: supercharge/[email protected]
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build
- run: npm test
env:
CI: true

build_and_push:
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Docker meta Service Name
id: docker_meta_img
uses: crazy-max/ghaction-docker-meta@v2
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch,enable=false,priority=600
type=sha,enable=true,priority=600,prefix=
- name: Log into registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GHCR_DOCKER_USERNAME }}
password: ${{ secrets.GHCR_DOCKER_TOKEN }}

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

- name: Build and push ${{ github.repository }}
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}
labels: ${{ steps.docker_meta_img.outputs.labels }}
33 changes: 0 additions & 33 deletions .github/workflows/nodejs.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: Build and push Docker Image on Tag

on:
push:
tags:
- '[0-9]*'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
redis-version: [5] # [4, 5]
steps:
- name: Git checkout
uses: actions/checkout@v1
- name: Start Mailcatcher
run: docker run --name mailcatcher --publish 1025:1025 --detach schickling/mailcatcher
- name: Start MongoDB
uses: supercharge/[email protected]
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build
- run: npm test
env:
CI: true

build_and_push:
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Docker meta Service Name for docker hub
id: docker_meta_img_hub
uses: docker/metadata-action@v3
with:
images: schulcloud/schulcloud-server
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Log into registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

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

- name: Build and push ${{ github.repository }}
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.docker_meta_img_hub.outputs.tags }}
labels: ${{ steps.docker_meta_img_hub.outputs.labels }}
31 changes: 18 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Allowed Types of change: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`

Expand All @@ -25,37 +24,43 @@ Allowed Types of change: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `

- SC-6832, SC-7568 - New implementation of mail service

# Release 1.2.4
## [1.2.5] - 2021-06-24

## Bugfix
### Changed

- OPS-2468 - changes build pipeline to github actions

## [1.2.4]

### Fixed

- SC-8772 - update extend of mongodb connection

# Release 1.2.3
## [1.2.3]

# Release 1.2.2
## [1.2.2]

## Features
### Added

- OPS-1575 - Added E-Mail address validation

# Release 1.1.1
## [1.1.1]

## Features
### Added

- Removed file log handler. (OPS-746)
- Added multi-stages to Dockerfile. (OPS-746)

# Release 1.1.0
## [1.1.0]

## Features
### Added

- Added Makefile and GitHub Actions build pipeline (#205, OPS-623)
- Added support for multiple SMTP configs (#206, SC-4907)
- Added support for bounce address (#207, SC-4908)

# Hotfix 1.0.1
## [1.0.1]

## Features
### Added

- Added replyTo on mail interface
Loading

0 comments on commit a5ed008

Please sign in to comment.