Rustam Gimadiev 4 лет назад
Родитель
Сommit
78a971193b

+ 1 - 1
.github/workflows/maven.yml → .github/workflows/backend.yml

@@ -1,4 +1,4 @@
-name: Java CI with Maven
+name: backend
 on:
 on:
   push:
   push:
     branches: [ '*' ]
     branches: [ '*' ]

+ 31 - 0
.github/workflows/charts.yaml

@@ -0,0 +1,31 @@
+name: charts
+on:
+  create:
+    tags:
+      - "v*.*.*"
+jobs:
+  release:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 0
+      - run: |
+          git config user.name github-actions
+          git config user.email github-actions@github.com
+      - uses: azure/setup-helm@v1
+      - name: update appVersion
+        run: |
+          export version=${GITHUB_REF##*/}
+          sed -i "s/appVersion:.*/appVersion: ${version}/" charts/kafka-ui/Chart.yaml
+      - name:
+        run: |
+          export VERSION=${GITHUB_REF##*/}
+          MSG=$(helm package --app-version ${VERSION} charts/kafka-ui)
+          git fetch origin
+          git stash
+          git checkout -b gh-pages origin/gh-pages
+          helm repo index .
+          git add -f ${MSG##*/} index.yaml
+          git commit -m "release ${VERSION}"
+          git push

+ 77 - 0
.github/workflows/release.yaml

@@ -0,0 +1,77 @@
+name: release
+on: 
+  workflow_dispatch:
+
+jobs:
+  release:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - run: |
+          git config user.name github-actions
+          git config user.email github-actions@github.com
+      - name: Cache local Maven repository
+        uses: actions/cache@v2
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
+      - uses: actions/checkout@v2
+      - name: Set up JDK 1.13
+        uses: actions/setup-java@v1
+        with:
+          java-version: 1.13
+      - name: Update development version
+        run: |
+          mvn -q versions:set -DnextSnapshot
+          git add pom.xml **/pom.xml
+          git commit -m "Increased version in pom.xml"
+          git push -f
+          git reset --hard HEAD~1
+      - name: Prepare release
+        id: prep
+        run: |
+          mvn -q versions:set -DremoveSnapshot
+          export VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
+          git add .
+          git commit -m "release ${VERSION}"
+          git tag -f v${VERSION}
+          git push --tags
+          echo ::set-output name=version::${VERSION}
+      - name: Build with Maven
+        run: mvn clean package -Pprod
+#################
+#               #
+# Docker images #
+#               #
+#################
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v1
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v1
+      - name: Cache Docker layers
+        uses: actions/cache@v2
+        with:
+          path: /tmp/.buildx-cache
+          key: ${{ runner.os }}-buildx-${{ github.sha }}
+          restore-keys: |
+            ${{ runner.os }}-buildx-
+      - name: Login to DockerHub
+        if: github.ref == 'refs/heads/master'
+        uses: docker/login-action@v1 
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+      - name: Build and push
+        id: docker_build
+        uses: docker/build-push-action@v2
+        with:
+          builder: ${{ steps.buildx.outputs.name }}
+          context: kafka-ui-api
+          push: github.ref == 'refs/heads/master'
+          tags: provectuslabs/kafka-ui:${{ steps.prep.outputs.version }}
+          build-args: |
+            JAR_FILE=kafka-ui-api-${{ steps.prep.outputs.version }}.jar
+          cache-from: type=local,src=/tmp/.buildx-cache
+          cache-to: type=local,dest=/tmp/.buildx-cache

+ 0 - 0
chart/kafka-ui/.helmignore → charts/kafka-ui/.helmignore


+ 2 - 1
chart/kafka-ui/Chart.yaml → charts/kafka-ui/Chart.yaml

@@ -3,4 +3,5 @@ name: kafka-ui
 description: A Helm chart for kafka-UI
 description: A Helm chart for kafka-UI
 type: application
 type: application
 version: 0.0.1
 version: 0.0.1
-appVersion: 0.0.9
+appVersion: latest
+icon: https://github.com/provectus/kafka-ui/raw/master/images/kafka-ui-logo.png

+ 0 - 0
chart/kafka-ui/README.md → charts/kafka-ui/README.md


+ 0 - 0
chart/kafka-ui/templates/NOTES.txt → charts/kafka-ui/templates/NOTES.txt


+ 0 - 0
chart/kafka-ui/templates/_helpers.tpl → charts/kafka-ui/templates/_helpers.tpl


+ 0 - 0
chart/kafka-ui/templates/configmap.yaml → charts/kafka-ui/templates/configmap.yaml


+ 0 - 0
chart/kafka-ui/templates/deployment.yaml → charts/kafka-ui/templates/deployment.yaml


+ 0 - 0
chart/kafka-ui/templates/hpa.yaml → charts/kafka-ui/templates/hpa.yaml


+ 0 - 0
chart/kafka-ui/templates/ingress.yaml → charts/kafka-ui/templates/ingress.yaml


+ 0 - 0
chart/kafka-ui/templates/secret.yaml → charts/kafka-ui/templates/secret.yaml


+ 0 - 0
chart/kafka-ui/templates/service.yaml → charts/kafka-ui/templates/service.yaml


+ 0 - 0
chart/kafka-ui/templates/serviceaccount.yaml → charts/kafka-ui/templates/serviceaccount.yaml


+ 0 - 0
chart/kafka-ui/values.yaml → charts/kafka-ui/values.yaml