Skip to content

Commit

Permalink
CI: Publish version tags with all images (#107)
Browse files Browse the repository at this point in the history
* .github: Fix go.yml workflow (requires go 1.15)

Also consistent with dockerfile

* .github: Publish all docker images with git tags

* Test one of the builds

* Revert "Test one of the builds"

This reverts commit 25cd1d0.

* Use Github Release Tags action for docker tags

* Remove old tags steps

* Use github action in all other workflows

* Remove test branch from workflow config

* Use force-latest option in action to avoid boilerplate

* test load-tester build

* Revert "test load-tester build"

This reverts commit 48055f7.

* Use new docker repositories for each service ✨

* Test all them builds!

* Revert "Test all them builds!"

This reverts commit 9152b48.
  • Loading branch information
victorges authored Sep 30, 2021
1 parent d809df7 commit 41209e8
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 58 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,24 @@ jobs:
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD

- name: Tags
id: tags
uses: livepeer/action-gh-release-tags@v0
with:
force-latest: true

- name: Build the Docker image
# run: docker build . --file Dockerfile --tag livepeer/streamtester:$(date +%s)
run: docker build . --file Dockerfile --tag livepeer/streamtester:latest --build-arg version=$(git describe --dirty)
- name: Get tag name
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Tag version
if: startsWith(github.ref, 'refs/tags/v')
run: |
docker tag livepeer/streamtester:latest livepeer/streamtester:${{ steps.get_version.outputs.VERSION }}
docker push livepeer/streamtester:${{ steps.get_version.outputs.VERSION }}
TAGS='${{ steps.tags.outputs.tags }}'
docker build . --file Dockerfile $(printf ' -t livepeer/streamtester:%s' $TAGS) --build-arg "version=${{ steps.tags.outputs.version }}"
- name: Push Docker Container to Registry
run: docker push livepeer/streamtester:latest
run: |
for TAG in ${{ steps.tags.outputs.tags }}; do
docker push livepeer/streamtester:$TAG
done
- name: Notify that new build has been uploaded
run: curl -X POST https://holy-bread-207a.livepeer.workers.dev
14 changes: 7 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Publish new Release
#on: [push]
on:
push:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.14
- name: Set up Go 1.15
uses: actions/setup-go@v1
with:
go-version: 1.14
go-version: 1.15
id: go

- name: Check out code into the Go module directory
Expand Down Expand Up @@ -55,10 +55,10 @@ jobs:
needs: create_release
steps:

- name: Set up Go 1.14
- name: Set up Go 1.15
uses: actions/setup-go@v1
with:
go-version: 1.14
go-version: 1.15
id: go

- name: Check out code into the Go module directory
Expand All @@ -76,7 +76,7 @@ jobs:
make mapi
make connector
make loadtester
make recordtester
make recordtester
- name: Compress Posix
if: matrix.os != 'windows-latest'
Expand All @@ -88,7 +88,7 @@ jobs:
gzip -9 -S .${{runner.os}}.gz mapi
gzip -9 -S .${{runner.os}}.gz recordtester
gzip -9 -S .${{runner.os}}.gz mist-api-connector
- name: Compress Windows
if: matrix.os == 'windows-latest'
run: |
Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/load-tester-dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@ jobs:
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD

- name: Tags
id: tags
uses: livepeer/action-gh-release-tags@v0
with:
force-latest: true

- name: Build the Docker image
# run: docker build . --file Dockerfile --tag livepeer/streamtester:$(date +%s)
run: docker build . --file Dockerfile.load-tester --tag livepeer/streamtester:load-tester --build-arg version=$(git describe --dirty)
- name: Get tag name
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Tag version
if: startsWith(github.ref, 'refs/tags/v')
run: |
docker tag livepeer/streamtester:load-tester livepeer/streamtester:load-tester${{ steps.get_version.outputs.VERSION }}
docker push livepeer/streamtester:load-tester${{ steps.get_version.outputs.VERSION }}
TAGS='${{ steps.tags.outputs.tags }}'
docker build . --file Dockerfile.load-tester $(printf ' -t livepeer/loadtester:%s' $TAGS) --build-arg "version=${{ steps.tags.outputs.version }}"
- name: Push Docker Container to Registry
run: docker push livepeer/streamtester:load-tester
run: |
for TAG in ${{ steps.tags.outputs.tags }}; do
docker push livepeer/loadtester:$TAG
done
26 changes: 15 additions & 11 deletions .github/workflows/mist-api-connector-dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,24 @@ jobs:
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD

- name: Tags
id: tags
uses: livepeer/action-gh-release-tags@v0
with:
force-latest: true

- name: Build the Docker image
# run: docker build . --file Dockerfile --tag livepeer/streamtester:$(date +%s)
run: docker build . --file Dockerfile.mist-api-connector --tag livepeer/streamtester:mist-api-connector --build-arg version=$(git describe --dirty)
- name: Get tag name
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Tag version
if: startsWith(github.ref, 'refs/tags/v')
run: |
docker tag livepeer/streamtester:mist-api-connector livepeer/streamtester:mist-api-connector${{ steps.get_version.outputs.VERSION }}
docker push livepeer/streamtester:mistapiconnector${{ steps.get_version.outputs.VERSION }}
TAGS='${{ steps.tags.outputs.tags }}'
docker build . --file Dockerfile.mist-api-connector $(printf ' -t livepeer/mist-api-connector:%s' $TAGS) --build-arg "version=${{ steps.tags.outputs.version }}"
- name: Push Docker Container to Registry
run: docker push livepeer/streamtester:mist-api-connector
run: |
for TAG in ${{ steps.tags.outputs.tags }}; do
docker push livepeer/mist-api-connector:$TAG
done
- name: Notify that new build has been uploaded
run: curl -X POST https://holy-bread-207a.livepeer.workers.dev
32 changes: 14 additions & 18 deletions .github/workflows/record-tester-dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,21 @@ jobs:
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD

- name: Tags
id: tags
uses: livepeer/action-gh-release-tags@v0
with:
force-latest: true

- name: Build the Docker image
# run: docker build . --file Dockerfile --tag livepeer/streamtester:$(date +%s)
run: docker build . --file Dockerfile.record-tester --tag livepeer/streamtester:record-tester --build-arg version=$(git describe --dirty)
- name: Get tag name
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Tag version
if: startsWith(github.ref, 'refs/tags/v')
run: |
docker tag livepeer/streamtester:record-tester livepeer/streamtester:record-tester${{ steps.get_version.outputs.VERSION }}
docker push livepeer/streamtester:record-tester${{ steps.get_version.outputs.VERSION }}
- name: Describe
id: describe
run: |
VER=$(git describe)
echo "version_from_git=$VER" >> $GITHUB_ENV
TAGS='${{ steps.tags.outputs.tags }}'
docker build . --file Dockerfile.record-tester $(printf ' -t livepeer/record-tester:%s' $TAGS) --build-arg "version=${{ steps.tags.outputs.version }}"
- name: Push Docker Container to Registry
run: |
docker tag livepeer/streamtester:record-tester livepeer/streamtester:record-tester-${{ env.version_from_git }}
docker push livepeer/streamtester:record-tester
docker push livepeer/streamtester:record-tester-${{ env.version_from_git }}
for TAG in ${{ steps.tags.outputs.tags }}; do
docker push livepeer/record-tester:$TAG
done

0 comments on commit 41209e8

Please sign in to comment.