Skip to content

Commit

Permalink
automatic merge to finish v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cars10 committed Jan 14, 2025
2 parents 8b530a5 + 2391ead commit 48fb236
Show file tree
Hide file tree
Showing 10 changed files with 173 additions and 48 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ yarn-*.log
# Tests
/test-results/
/playwright-report/
/playwright-report-ci/
/playwright/.cache/
playwright/.auth
tests/*.png
Expand All @@ -30,3 +31,4 @@ browser_extension/*
!browser_extension/firefox/manifest.json
tmp
src-tauri/target
scripts/screenshots/*
116 changes: 74 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,72 @@ jobs:

- uses: actions/checkout@v4

### WINDOWS

- uses: actions/setup-node@v4
with:
node-version: '22.5.1'
cache: 'yarn'
if: matrix.platform == 'windows-latest'

- run: yarn
if: matrix.platform == 'windows-latest'

- run: rustup toolchain install stable
if: matrix.platform == 'windows-latest'

- name: windows > build
run: yarn tauri:build
if: matrix.platform == 'windows-latest'

- name: windows > upload artifacts
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: windows_artifacts
if-no-files-found: error
path: |
src-tauri/target/release/bundle/msi/elasticvue_*_x64*
src-tauri/target/release/elasticvue.exe
### LINUX

- name: linux > build
run: make TAURI_SIGNING_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}" TAURI_SIGNING_PRIVATE_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}" build_docker_tauri
if: matrix.platform == 'ubuntu-latest'

- name: linux > upload artifacts
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: linux_artifacts
if-no-files-found: error
path: |
src-tauri/target/release/bundle/deb/elasticvue_*_amd64.deb
src-tauri/target/release/bundle/appimage/elasticvue_*_amd64.*
src-tauri/target/release/elasticvue
### MAC

- uses: actions/setup-node@v4
with:
node-version: '22.5.1'
cache: 'yarn'
if: matrix.platform == 'macos-latest'

- run: yarn
if: matrix.platform == 'macos-latest'

- run: rustup toolchain install stable
if: matrix.platform == 'macos-latest'

- name: mac > setup targets
if: matrix.platform == 'macos-latest'
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
- name: linux > install dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-0=2.44.0-2 libwebkit2gtk-4.1-dev=2.44.0-2 libjavascriptcoregtk-4.1-0=2.44.0-2 libjavascriptcoregtk-4.1-dev=2.44.0-2 gir1.2-javascriptcoregtk-4.1=2.44.0-2 gir1.2-webkit2-4.1=2.44.0-2 build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
### build apple arm
#### build mac arm

- name: mac aaarch64 > build
run: yarn tauri:build --target aarch64-apple-darwin
Expand All @@ -70,7 +116,7 @@ jobs:
src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/elasticvue_*_aarch64.dmg
src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue_aarch64*
### build apple x86_64
#### build mac x86_64

- name: mac x86_64 > build
run: yarn tauri:build --target x86_64-apple-darwin
Expand All @@ -92,51 +138,37 @@ jobs:
src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/elasticvue_*_x64.dmg
src-tauri/target/x86_64-apple-darwin/release/bundle/macos/elasticvue_x64*
### build linux

- name: linux > build
run: yarn tauri:build
if: matrix.platform == 'ubuntu-latest'

- name: linux > upload artifacts
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: linux_artifacts
if-no-files-found: error
path: |
src-tauri/target/release/bundle/deb/elasticvue_*_amd64.deb
src-tauri/target/release/bundle/appimage/elasticvue_*_amd64.*
src-tauri/target/release/elasticvue
### build windows
build_browser_extensions:
name: Build browser extensions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: windows > build
run: yarn tauri:build
if: matrix.platform == 'windows-latest'
- name: build extensions
run: make build_browser_extensions

- name: windows > upload artifacts
if: matrix.platform == 'windows-latest'
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows_artifacts
name: browser_extension_artifacts
if-no-files-found: error
path: |
src-tauri/target/release/bundle/msi/elasticvue_*_x64*
src-tauri/target/release/elasticvue.exe
artifacts/*.zip
build_docker:
name: Build docker images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Docker hub login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand All @@ -156,6 +188,7 @@ jobs:
tags: cars10/elasticvue:latest,cars10/elasticvue:${{ steps.package-version.outputs.current-version }}
#tags: cars10/elasticvue:${{ steps.package-version.outputs.current-version }}


publish:
name: Publish release
needs:
Expand Down Expand Up @@ -203,6 +236,7 @@ jobs:
github-artifacts/mac_x86_64_artifacts/macos/elasticvue_x64*
github-artifacts/windows_artifacts/bundle/msi/elasticvue_*_x64*
github-artifacts/windows_artifacts/elasticvue.exe
github-artifacts/browser_extension_artifacts/*.zip
body: |
## Changelog
${{ steps.changelog.outputs.changelog }}
Expand All @@ -221,10 +255,8 @@ jobs:
* [Hosted](https://app.elasticvue.com)
- name: deploy
uses: fjogeleit/http-request-action@v1
with:
url: 'https://autodok.cars10k.de/update'
timeout: 60000
method: 'POST'
customHeaders: '{"Content-Type": "application/json", "authorization": "${{ secrets.AUTODOK_API_KEY }}"}'
data: '{"container": "elasticvue", "image": "cars10/elasticvue:latest"}'
run: |
curl -X POST https://autodok.cars10k.de/update \
-H "Content-Type: application/json" \
-H "Authorization: ${{ secrets.AUTODOK_API_KEY }}" \
-d '{"container": "elasticvue", "image": "cars10/elasticvue:latest"}'
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog

# 1.2.0
## 1.3.0

Change the build process for the linux desktop app. It now requires glibc `3.35`, so it should run distros using
older versions of glibc, like `debian:bookworm` or `ubuntu:jammy`.

## 1.2.0

* adds support for date math in index names. You can use something like `<kube-{now/d}>` as your index name, when
searching and also in the `REST` view. fixes [#267](https://github.com/cars10/elasticvue/issues/267)
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
CI ?=
TAURI_SIGNING_PRIVATE_KEY ?=
TAURI_SIGNING_PRIVATE_KEY_PASSWORD ?=

build_docker_ci:
docker build -f docker/Dockerfile_ci -t elasticvue-ci .
Expand All @@ -9,6 +11,13 @@ ci: build_docker_ci
build_tauri:
yarn tauri:build

build_docker_tauri:
docker build . -t elasticvue-linux-tauri -f docker/Dockerfile_tauri
docker run --rm -e TAURI_SIGNING_PRIVATE_KEY="$(TAURI_SIGNING_PRIVATE_KEY)" \
-e TAURI_SIGNING_PRIVATE_KEY_PASSWORD="$(TAURI_SIGNING_PRIVATE_KEY_PASSWORD)" \
-v .:/app \
elasticvue-linux-tauri bash -c "yarn && . ~/.cargo/env && rm -rf src-tauri/target && yarn tauri:build"

# Build docker image to run elasticvue served by nginx
build_docker_nginx:
docker build -f docker/Dockerfile -t elasticvue .
Expand Down
2 changes: 1 addition & 1 deletion browser_extension/chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Elasticvue",
"version": "1.2.0",
"version": "1.3.0",
"description": "Elasticsearch frontend",
"manifest_version": 3,
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion browser_extension/firefox/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Elasticvue",
"version": "1.2.0",
"version": "1.3.0",
"description": "Elasticsearch frontend",
"manifest_version": 2,
"icons": {
Expand Down
69 changes: 69 additions & 0 deletions docker/Dockerfile_tauri
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
FROM ubuntu:jammy

ENV NODE_VERSION=22
ENV APP_HOME=/app
ENV BUILD_USER=tauri

RUN useradd --uid 1000 -m $BUILD_USER
RUN mkdir -p $APP_HOME
RUN chown -R 1000:1000 $APP_HOME

WORKDIR $APP_HOME

RUN apt-get update && \
apt-get install -y wget curl vim gpg \
&& apt-get clean \
&& apt-get autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

USER $BUILD_USER

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y

USER root

RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y nodejs yarn \
&& apt-get clean \
&& apt-get autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

# download old versions because of EGL issues, see https://github.com/h3poteto/fedistar/issues/1717
RUN mkdir -p /tmp/ubuntu-packages \
&& cd /tmp/ubuntu-packages \
&& wget https://launchpadlibrarian.net/723972773/libwebkit2gtk-4.1-0_2.44.0-0ubuntu0.22.04.1_amd64.deb \
&& wget https://launchpadlibrarian.net/723972761/libwebkit2gtk-4.1-dev_2.44.0-0ubuntu0.22.04.1_amd64.deb \
&& wget https://launchpadlibrarian.net/723972770/libjavascriptcoregtk-4.1-0_2.44.0-0ubuntu0.22.04.1_amd64.deb \
&& wget https://launchpadlibrarian.net/723972746/libjavascriptcoregtk-4.1-dev_2.44.0-0ubuntu0.22.04.1_amd64.deb \
&& wget https://launchpadlibrarian.net/723972735/gir1.2-javascriptcoregtk-4.1_2.44.0-0ubuntu0.22.04.1_amd64.deb \
&& wget https://launchpadlibrarian.net/723972739/gir1.2-webkit2-4.1_2.44.0-0ubuntu0.22.04.1_amd64.deb \
&& wget https://launchpadlibrarian.net/606433947/libicu70_70.1-2ubuntu1_amd64.deb \
&& wget https://launchpadlibrarian.net/606433941/libicu-dev_70.1-2ubuntu1_amd64.deb \
&& wget https://launchpadlibrarian.net/606433945/icu-devtools_70.1-2ubuntu1_amd64.deb \
&& wget https://launchpadlibrarian.net/595623693/libjpeg8_8c-2ubuntu10_amd64.deb \
&& wget https://launchpadlibrarian.net/587202140/libjpeg-turbo8_2.1.2-0ubuntu1_amd64.deb \
&& wget https://launchpadlibrarian.net/592959859/xdg-desktop-portal-gtk_1.14.0-1build1_amd64.deb

RUN apt-get update \
&& apt-get install -y build-essential \
file \
libssl-dev \
libgtk-3-dev \
libxdo-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
&& apt-get install -y /tmp/ubuntu-packages/*.deb \
&& rm -rf /tmp/ubuntu-packages \
&& apt-get clean \
&& apt-get autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

USER $BUILD_USER
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "elasticvue",
"private": true,
"version": "1.2.0",
"version": "1.3.0",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down Expand Up @@ -51,6 +51,7 @@
"@vitejs/plugin-vue": "^5.2.1",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/tsconfig": "^0.7.0",
"cross-env": "^7.0.3",
"eslint": "^9.16.0",
"eslint-plugin-vue": "^9.32.0",
"sass": "^1.82.0",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"productName": "elasticvue",
"mainBinaryName": "elasticvue",
"version": "1.2.0",
"version": "1.3.0",
"identifier": "com.elasticvue.app",
"plugins": {
"updater": {
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1733,7 +1733,14 @@ crelt@^1.0.5:
resolved "https://registry.yarnpkg.com/crelt/-/crelt-1.0.6.tgz#7cc898ea74e190fb6ef9dae57f8f81cf7302df72"
integrity sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==

cross-spawn@^7.0.0, cross-spawn@^7.0.3, cross-spawn@^7.0.5:
cross-env@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
dependencies:
cross-spawn "^7.0.1"

cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.3, cross-spawn@^7.0.5:
version "7.0.6"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f"
integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==
Expand Down

0 comments on commit 48fb236

Please sign in to comment.