Skip to content

Commit 78a9711

Browse files
release jobs (#194)
1 parent 6fb1d12 commit 78a9711

File tree

16 files changed

+111
-2
lines changed

16 files changed

+111
-2
lines changed

.github/workflows/maven.yml renamed to .github/workflows/backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java CI with Maven
1+
name: backend
22
on:
33
push:
44
branches: [ '*' ]

.github/workflows/charts.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: charts
2+
on:
3+
create:
4+
tags:
5+
- "v*.*.*"
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
- run: |
14+
git config user.name github-actions
15+
git config user.email [email protected]
16+
- uses: azure/setup-helm@v1
17+
- name: update appVersion
18+
run: |
19+
export version=${GITHUB_REF##*/}
20+
sed -i "s/appVersion:.*/appVersion: ${version}/" charts/kafka-ui/Chart.yaml
21+
- name:
22+
run: |
23+
export VERSION=${GITHUB_REF##*/}
24+
MSG=$(helm package --app-version ${VERSION} charts/kafka-ui)
25+
git fetch origin
26+
git stash
27+
git checkout -b gh-pages origin/gh-pages
28+
helm repo index .
29+
git add -f ${MSG##*/} index.yaml
30+
git commit -m "release ${VERSION}"
31+
git push

.github/workflows/release.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: release
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- run: |
11+
git config user.name github-actions
12+
git config user.email [email protected]
13+
- name: Cache local Maven repository
14+
uses: actions/cache@v2
15+
with:
16+
path: ~/.m2/repository
17+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
18+
restore-keys: |
19+
${{ runner.os }}-maven-
20+
- uses: actions/checkout@v2
21+
- name: Set up JDK 1.13
22+
uses: actions/setup-java@v1
23+
with:
24+
java-version: 1.13
25+
- name: Update development version
26+
run: |
27+
mvn -q versions:set -DnextSnapshot
28+
git add pom.xml **/pom.xml
29+
git commit -m "Increased version in pom.xml"
30+
git push -f
31+
git reset --hard HEAD~1
32+
- name: Prepare release
33+
id: prep
34+
run: |
35+
mvn -q versions:set -DremoveSnapshot
36+
export VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
37+
git add .
38+
git commit -m "release ${VERSION}"
39+
git tag -f v${VERSION}
40+
git push --tags
41+
echo ::set-output name=version::${VERSION}
42+
- name: Build with Maven
43+
run: mvn clean package -Pprod
44+
#################
45+
# #
46+
# Docker images #
47+
# #
48+
#################
49+
- name: Set up QEMU
50+
uses: docker/setup-qemu-action@v1
51+
- name: Set up Docker Buildx
52+
uses: docker/setup-buildx-action@v1
53+
- name: Cache Docker layers
54+
uses: actions/cache@v2
55+
with:
56+
path: /tmp/.buildx-cache
57+
key: ${{ runner.os }}-buildx-${{ github.sha }}
58+
restore-keys: |
59+
${{ runner.os }}-buildx-
60+
- name: Login to DockerHub
61+
if: github.ref == 'refs/heads/master'
62+
uses: docker/login-action@v1
63+
with:
64+
username: ${{ secrets.DOCKERHUB_USERNAME }}
65+
password: ${{ secrets.DOCKERHUB_TOKEN }}
66+
- name: Build and push
67+
id: docker_build
68+
uses: docker/build-push-action@v2
69+
with:
70+
builder: ${{ steps.buildx.outputs.name }}
71+
context: kafka-ui-api
72+
push: github.ref == 'refs/heads/master'
73+
tags: provectuslabs/kafka-ui:${{ steps.prep.outputs.version }}
74+
build-args: |
75+
JAR_FILE=kafka-ui-api-${{ steps.prep.outputs.version }}.jar
76+
cache-from: type=local,src=/tmp/.buildx-cache
77+
cache-to: type=local,dest=/tmp/.buildx-cache
File renamed without changes.

chart/kafka-ui/Chart.yaml renamed to charts/kafka-ui/Chart.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ name: kafka-ui
33
description: A Helm chart for kafka-UI
44
type: application
55
version: 0.0.1
6-
appVersion: 0.0.9
6+
appVersion: latest
7+
icon: https://github.com/provectus/kafka-ui/raw/master/images/kafka-ui-logo.png
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)