Skip to content

Commit 8c95611

Browse files
committed
Merge branch 'dev'
2 parents 2acec75 + 8dc8eb7 commit 8c95611

File tree

507 files changed

+36882
-15275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

507 files changed

+36882
-15275
lines changed
Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
1-
name: 'Build base:alpine-core'
1+
name: "Build base:alpine-core"
22

33
on:
4-
workflow_dispatch:
5-
push:
6-
branches-ignore:
7-
- '**'
4+
workflow_dispatch:
5+
push:
6+
branches-ignore:
7+
- "**"
88

99
jobs:
10-
docker:
11-
runs-on: [self-hosted]
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
16-
- uses: cardinalby/export-env-action@v1
17-
with:
18-
envFile: '.github_build/Build.alpine.env'
19-
export: 'true'
20-
expandWithJobEnv: 'true'
21-
expand: 'true'
22-
23-
- name: Set up QEMU
24-
uses: docker/setup-qemu-action@master
25-
with:
26-
platforms: all
27-
28-
- name: Set up Docker Buildx
29-
id: buildx
30-
uses: docker/setup-buildx-action@master
31-
32-
- name: Cache Docker layers
33-
uses: actions/cache@v2
34-
with:
35-
path: /tmp/.buildx-cache
36-
key: ${{ runner.os }}-buildx-${{ github.sha }}
37-
restore-keys: |
38-
${{ runner.os }}-buildx-
39-
40-
- name: Login to DockerHub
41-
if: github.event_name != 'pull_request'
42-
uses: docker/login-action@v1
43-
with:
44-
username: ${{ secrets.DOCKER_USERNAME }}
45-
password: ${{ secrets.DOCKER_PASSWORD }}
46-
47-
- name: Build Multi-Arch
48-
uses: docker/build-push-action@v2
49-
with:
50-
builder: ${{ steps.buildx.outputs.name }}
51-
context: .
52-
file: ./Dockerfile
53-
build-args: |
54-
BUILD_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }}
55-
GOLANG_IMAGE=${{ env.GOLANG_IMAGE }}
56-
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
57-
push: true
58-
tags: |
59-
datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }}
60-
datarhei/base:${{ env.OS_NAME }}-core-latest
61-
cache-from: type=local,src=/tmp/.buildx-cache
62-
cache-to: type=local,dest=/tmp/.buildx-cache-new
10+
docker:
11+
runs-on: [self-hosted]
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- uses: cardinalby/export-env-action@v1
17+
with:
18+
envFile: ".github_build/Build.alpine.env"
19+
export: "true"
20+
expandWithJobEnv: "true"
21+
expand: "true"
22+
23+
- name: Set up QEMU
24+
uses: docker/setup-qemu-action@master
25+
with:
26+
platforms: all
27+
28+
- name: Set up Docker Buildx
29+
id: buildx
30+
uses: docker/setup-buildx-action@master
31+
32+
- name: Cache Docker layers
33+
uses: actions/cache@v2
34+
with:
35+
path: /tmp/.buildx-cache
36+
key: ${{ runner.os }}-buildx-${{ github.sha }}
37+
restore-keys: |
38+
${{ runner.os }}-buildx-
39+
40+
- name: Login to DockerHub
41+
if: github.event_name != 'pull_request'
42+
uses: docker/login-action@v1
43+
with:
44+
username: ${{ secrets.DOCKER_USERNAME }}
45+
password: ${{ secrets.DOCKER_PASSWORD }}
46+
47+
- name: Build Multi-Arch
48+
uses: docker/build-push-action@v2
49+
with:
50+
builder: ${{ steps.buildx.outputs.name }}
51+
context: .
52+
file: ./Dockerfile
53+
build-args: |
54+
BUILD_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }}
55+
GOLANG_IMAGE=${{ env.GOLANG_IMAGE }}
56+
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
57+
push: true
58+
tags: |
59+
datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }}
60+
datarhei/base:${{ env.OS_NAME }}-core-latest
61+
cache-from: type=local,src=/tmp/.buildx-cache
62+
cache-to: type=local,dest=/tmp/.buildx-cache-new

.github/workflows/build_base_alpine_dev.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Build datarhei/base:alpine-core-dev'
1+
name: 'Build base:alpine-core:dev'
22

33
on:
44
workflow_dispatch:
@@ -81,9 +81,12 @@ jobs:
8181
labels: ${{ steps.meta.outputs.labels }}
8282
cache-from: type=local,src=/tmp/.buildx-cache
8383
cache-to: type=local,dest=/tmp/.buildx-cache-new
84+
<<<<<<< HEAD
8485
dockerBundle:
8586
uses: ./.github/workflows/build_bundle_dev.yaml
8687
secrets: inherit
8788
dockerBundleRpi:
8889
uses: ./.github/workflows/build_bundle-rpi_dev.yaml
8990
secrets: inherit
91+
=======
92+
>>>>>>> dev
Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
1-
name: 'Build core:rpi'
1+
name: "Build core:rpi"
22

33
on:
4-
workflow_dispatch:
5-
schedule:
6-
- cron: '7 5 * * *'
7-
push:
8-
branches-ignore:
9-
- '**'
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "7 5 * * *"
7+
push:
8+
branches-ignore:
9+
- "**"
1010

1111
jobs:
12-
docker:
13-
runs-on: [self-hosted]
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v2
12+
docker:
13+
runs-on: [self-hosted]
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
1717

18-
- uses: cardinalby/export-env-action@v1
19-
with:
20-
envFile: '.github_build/Build.alpine.env'
21-
export: 'true'
22-
expandWithJobEnv: 'true'
23-
expand: 'true'
18+
- uses: cardinalby/export-env-action@v1
19+
with:
20+
envFile: ".github_build/Build.alpine.env"
21+
export: "true"
22+
expandWithJobEnv: "true"
23+
expand: "true"
2424

25-
- uses: cardinalby/export-env-action@v1
26-
with:
27-
envFile: '.github_build/Build.bundle.rpi.env'
28-
export: 'true'
29-
expandWithJobEnv: 'true'
30-
expand: 'true'
25+
- uses: cardinalby/export-env-action@v1
26+
with:
27+
envFile: ".github_build/Build.bundle.rpi.env"
28+
export: "true"
29+
expandWithJobEnv: "true"
30+
expand: "true"
3131

32-
- name: Set up QEMU
33-
uses: docker/setup-qemu-action@master
34-
with:
35-
platforms: all
32+
- name: Set up QEMU
33+
uses: docker/setup-qemu-action@master
34+
with:
35+
platforms: all
3636

37-
- name: Set up Docker Buildx
38-
id: buildx
39-
uses: docker/setup-buildx-action@master
37+
- name: Set up Docker Buildx
38+
id: buildx
39+
uses: docker/setup-buildx-action@master
4040

41-
- name: Cache Docker layers
42-
uses: actions/cache@v2
43-
with:
44-
path: /tmp/.buildx-cache
45-
key: ${{ runner.os }}-buildx-${{ github.sha }}
46-
restore-keys: |
47-
${{ runner.os }}-buildx-
41+
- name: Cache Docker layers
42+
uses: actions/cache@v2
43+
with:
44+
path: /tmp/.buildx-cache
45+
key: ${{ runner.os }}-buildx-${{ github.sha }}
46+
restore-keys: |
47+
${{ runner.os }}-buildx-
4848
49-
- name: Login to DockerHub
50-
if: github.event_name != 'pull_request'
51-
uses: docker/login-action@v1
52-
with:
53-
username: ${{ secrets.DOCKER_USERNAME }}
54-
password: ${{ secrets.DOCKER_PASSWORD }}
49+
- name: Login to DockerHub
50+
if: github.event_name != 'pull_request'
51+
uses: docker/login-action@v1
52+
with:
53+
username: ${{ secrets.DOCKER_USERNAME }}
54+
password: ${{ secrets.DOCKER_PASSWORD }}
5555

56-
- name: Build Multi-Arch
57-
uses: docker/build-push-action@v2
58-
with:
59-
builder: ${{ steps.buildx.outputs.name }}
60-
context: .
61-
file: ./Dockerfile.bundle
62-
build-args: |
63-
CORE_IMAGE=datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }}
64-
FFMPEG_IMAGE=datarhei/base:${{ env.OS_NAME }}-ffmpeg-rpi-${{ env.OS_VERSION }}-${{ env.FFMPEG_VERSION }}
65-
platforms: linux/arm/v7,linux/arm/v6,linux/arm64
66-
push: true
67-
tags: |
68-
datarhei/core:rpi-${{ env.CORE_VERSION }}
69-
datarhei/core:rpi-latest
70-
cache-from: type=local,src=/tmp/.buildx-cache
71-
cache-to: type=local,dest=/tmp/.buildx-cache-new
56+
- name: Build Multi-Arch
57+
uses: docker/build-push-action@v2
58+
with:
59+
builder: ${{ steps.buildx.outputs.name }}
60+
context: .
61+
file: ./Dockerfile.bundle
62+
build-args: |
63+
CORE_IMAGE=datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }}
64+
FFMPEG_IMAGE=datarhei/base:${{ env.OS_NAME }}-ffmpeg-rpi-${{ env.OS_VERSION }}-${{ env.FFMPEG_VERSION }}
65+
platforms: linux/arm/v7,linux/arm/v6,linux/arm64
66+
push: true
67+
tags: |
68+
datarhei/core:rpi-${{ env.CORE_VERSION }}
69+
datarhei/core:rpi-latest
70+
cache-from: type=local,src=/tmp/.buildx-cache
71+
cache-to: type=local,dest=/tmp/.buildx-cache-new

.github_build/Build.alpine.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# CORE ALPINE BASE IMAGE
22
OS_NAME=alpine
33
OS_VERSION=3.15
4-
GOLANG_IMAGE=golang:1.18.2-alpine3.15
5-
CORE_VERSION=16.8.0
4+
GOLANG_IMAGE=golang:1.18.4-alpine3.15
5+
CORE_VERSION=16.9.0

.github_build/Build.ubuntu.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# CORE UBUNTU BASE IMAGE
22
OS_NAME=ubuntu
33
OS_VERSION=20.04
4-
GOLANG_IMAGE=golang:1.18.2-alpine3.15
5-
CORE_VERSION=16.8.0
4+
GOLANG_IMAGE=golang:1.18.4-alpine3.15
5+
CORE_VERSION=16.9.0

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Core
22

3+
#### Core v16.8.0 > v16.9.0
4+
5+
- Add new placeholders and parameters for placeholder
6+
- Allow RTMP server if RTMPS server is enabled. In case you already had RTMPS enabled it will listen on the same port as before. An RTMP server will be started additionally listening on a lower port number. The RTMP app is required to start with a slash.
7+
- Add optional escape character to process placeholder
8+
- Fix output address validation for tee outputs
9+
- Fix updating process config
10+
- Add experimental SRT connection stats and logs API
11+
- Hide /config/reload endpoint in reade-only mode
12+
- Add experimental SRT server (datarhei/gosrt)
13+
- Create v16 in go.mod
14+
- Fix data races, tests, lint, and update dependencies
15+
- Add trailing slash for routed directories (datarhei/restreamer#340)
16+
- Allow relative URLs in content in static routes
17+
318
#### Core v16.7.2 > v16.8.0
419

520
- Add purge_on_delete function

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GOLANG_IMAGE=golang:1.17.6-alpine3.15
1+
ARG GOLANG_IMAGE=golang:1.18.4-alpine3.15
22

33
ARG BUILD_IMAGE=alpine:3.15
44

@@ -11,8 +11,8 @@ RUN apk add \
1111
make && \
1212
cd /dist/core && \
1313
go version && \
14-
make release && \
15-
make import
14+
make release_linux && \
15+
make import_linux
1616

1717
FROM $BUILD_IMAGE
1818

Dockerfile.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM golang:1.18.3-alpine3.15
2+
3+
RUN apk add alpine-sdk
4+
5+
COPY . /dist/core
6+
7+
RUN cd /dist/core && \
8+
go test -coverprofile=coverage.out -covermode=atomic -v ./...

Makefile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ COMMIT := $(shell if [ -d .git ]; then git rev-parse HEAD; else echo "unknown";
22
SHORTCOMMIT := $(shell echo $(COMMIT) | head -c 7)
33
BRANCH := $(shell if [ -d .git ]; then git rev-parse --abbrev-ref HEAD; else echo "master"; fi)
44
BUILD := $(shell date -u "+%Y-%m-%dT%H:%M:%SZ")
5-
OSARCH := $(shell if [ "${GOOS}" -a "${GOARCH}" ]; then echo "-${GOOS}-${GOARCH}"; else echo ""; fi)
5+
BINSUFFIX := $(shell if [ "${GOOS}" -a "${GOARCH}" ]; then echo "-${GOOS}-${GOARCH}"; else echo ""; fi)
66

77
all: build
88

99
## build: Build core (default)
1010
build:
11-
CGO_ENABLED=0 GOOS=linux GOARCH=${OSARCH} go build -o core${OSARCH}
11+
CGO_ENABLED=${CGO_ENABLED} GOOS=${GOOS} GOARCH=${GOARCH} go build -o core${BINSUFFIX}
12+
13+
# github workflow workaround
14+
build_linux:
15+
CGO_ENABLED=0 GOOS=linux GOARCH=${OSARCH} go build -o core
1216

1317
## swagger: Update swagger API documentation (requires github.com/swaggo/swag)
1418
swagger:
@@ -20,7 +24,7 @@ gqlgen:
2024

2125
## test: Run all tests
2226
test:
23-
go test -coverprofile=/dev/null ./...
27+
go test -race -coverprofile=/dev/null -v ./...
2428

2529
## vet: Analyze code for potential errors
2630
vet:
@@ -54,11 +58,15 @@ lint:
5458

5559
## import: Build import binary
5660
import:
61+
cd app/import && CGO_ENABLED=${CGO_ENABLED} GOOS=${GOOS} GOARCH=${GOARCH} go build -o ../../import -ldflags="-s -w"
62+
63+
# github workflow workaround
64+
import_linux:
5765
cd app/import && CGO_ENABLED=0 GOOS=linux GOARCH=${OSARCH} go build -o ../../import -ldflags="-s -w"
5866

5967
## coverage: Generate code coverage analysis
6068
coverage:
61-
go test -coverprofile test/cover.out ./...
69+
go test -race -coverprofile test/cover.out ./...
6270
go tool cover -html=test/cover.out -o test/cover.html
6371

6472
## commit: Prepare code for commit (vet, fmt, test)
@@ -67,6 +75,10 @@ commit: vet fmt lint test build
6775

6876
## release: Build a release binary of core
6977
release:
78+
CGO_ENABLED=${CGO_ENABLED} GOOS=${GOOS} GOARCH=${GOARCH} go build -o core -ldflags="-s -w -X github.com/datarhei/core/app.Commit=$(COMMIT) -X github.com/datarhei/core/app.Branch=$(BRANCH) -X github.com/datarhei/core/app.Build=$(BUILD)"
79+
80+
# github workflow workaround
81+
release_linux:
7082
CGO_ENABLED=0 GOOS=linux GOARCH=${OSARCH} go build -o core -ldflags="-s -w -X github.com/datarhei/core/app.Commit=$(COMMIT) -X github.com/datarhei/core/app.Branch=$(BRANCH) -X github.com/datarhei/core/app.Build=$(BUILD)"
7183

7284
## docker: Build standard Docker image

0 commit comments

Comments
 (0)