Skip to content

Commit b479196

Browse files
committed
Merge branch 'digma' into fix/header-styles
2 parents ef53762 + 777b780 commit b479196

Some content is hidden

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

54 files changed

+490
-246
lines changed

.github/workflows/digma/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
dist-filename:
7+
value: ${{ jobs.build.outputs.dist-filename }}
8+
version:
9+
value: ${{ jobs.build.outputs.version }}
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
dist-filename: ${{ steps.get-dist-filename.outputs.dist_filename }}
16+
version: ${{ steps.get-dist-filename.outputs.version }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-node@v4
20+
id: setup-node
21+
with:
22+
node-version-file: '.nvmrc'
23+
cache: 'npm'
24+
25+
- id: node-modules-cache
26+
uses: actions/cache@v4
27+
with:
28+
path: node_modules
29+
key: ${{ runner.os }}-node-${{ steps.setup-node.outputs.node-version }}-node_modules-${{ hashFiles('yarn.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-node-${{ steps.setup-node.outputs.node-version }}-node_modules-
32+
33+
- if: steps.node-modules-cache.outputs.cache-hit != 'true'
34+
run: yarn install --frozen-lockfile
35+
36+
- run: yarn build
37+
38+
- name: Get distributive filename and version
39+
id: get-dist-filename
40+
run: |
41+
git fetch --tags
42+
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
43+
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
44+
FILENAME="dist-$LATEST_TAG.zip"
45+
echo "DIST_FILENAME=$FILENAME" >> $GITHUB_ENV
46+
echo "dist_filename=$FILENAME" >> $GITHUB_OUTPUT
47+
echo "version=${LATEST_TAG#v}" >> $GITHUB_OUTPUT
48+
49+
- run: zip -r ${{ env.DIST_FILENAME }} packages/jaeger-ui/build/
50+
51+
- name: Upload artifact
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: ${{ env.DIST_FILENAME }}
55+
path: ${{ env.DIST_FILENAME }}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build & push Docker image
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
dist-artifact-name:
7+
type: string
8+
required: true
9+
push:
10+
type: boolean
11+
required: false
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/download-artifact@v4
20+
with:
21+
name: ${{ inputs.dist-artifact-name }}
22+
- run: |
23+
mkdir -p dist
24+
unzip -q ${{ inputs.dist-artifact-name }} -d dist
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
id: buildx
31+
uses: docker/setup-buildx-action@v3
32+
33+
- name: Login to Docker Hub
34+
uses: docker/login-action@v3
35+
with:
36+
username: ${{ secrets.DOCKERHUB_DIGMAAI_USERNAME }}
37+
password: ${{ secrets.DOCKERHUB_DIGMAAI_TOKEN }}
38+
39+
- name: Docker meta
40+
id: metadata
41+
uses: docker/metadata-action@v5
42+
with:
43+
images: digmaai/jaeger-ui
44+
tags: |
45+
type=schedule
46+
type=ref,event=branch
47+
type=ref,event=pr
48+
type=match,pattern=v(.*),group=1
49+
type=semver,pattern={{version}}
50+
type=semver,pattern={{major}}.{{minor}}
51+
type=semver,pattern={{major}}
52+
type=sha
53+
# set latest tag for digma branch
54+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'digma') }}
55+
56+
- name: Build and push
57+
if: ${{ inputs.push == 'true' }}
58+
uses: docker/build-push-action@v6
59+
with:
60+
context: .
61+
file: ./Dockerfile
62+
platforms: linux/amd64,linux/arm64
63+
push: ${{ inputs.push }}
64+
tags: ${{ steps.metadata.outputs.tags }}
65+
labels: ${{ steps.metadata.outputs.labels }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Lint & test
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
12+
id: setup-node
13+
with:
14+
node-version-file: '.nvmrc'
15+
cache: 'npm'
16+
17+
- id: node-modules-cache
18+
uses: actions/cache@v4
19+
with:
20+
path: node_modules
21+
key: ${{ runner.os }}-node-${{ steps.setup-node.outputs.node-version }}-node_modules-${{ hashFiles('yarn.lock') }}
22+
restore-keys: |
23+
${{ runner.os }}-node-${{ steps.setup-node.outputs.node-version }}-node_modules-
24+
25+
- if: steps.node-modules-cache.outputs.cache-hit != 'true'
26+
run: yarn install --frozen-lockfile
27+
28+
- name: Lint
29+
run: yarn lint
30+
31+
- name: Test
32+
run: yarn test

.github/workflows/digma/push.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Lint & test & build
2+
3+
on:
4+
push:
5+
branches: ['digma']
6+
# Github Actions don't support YAML anchors yet, so we have to repeat
7+
# the paths-ignore in both push and pull_request events.
8+
# More info: https://github.com/actions/runner/issues/1182
9+
paths-ignore:
10+
- '.vscode/**'
11+
- '.prettierignore'
12+
- '.prettierrc'
13+
- '*.md'
14+
- 'DCO'
15+
- 'LICENSE'
16+
pull_request:
17+
branches: ['digma']
18+
paths-ignore:
19+
- '.vscode/**'
20+
- '.prettierignore'
21+
- '.prettierrc'
22+
- '*.md'
23+
- 'DCO'
24+
- 'LICENSE'
25+
26+
jobs:
27+
lint-test:
28+
name: Lint & test
29+
uses: ./.github/workflows/lint-test.yml
30+
31+
build:
32+
name: Build
33+
needs: lint-test
34+
uses: ./.github/workflows/build.yml
35+
36+
build-test-docker-image:
37+
name: Build Docker image
38+
needs: build
39+
uses: ./.github/workflows/docker-image.yml
40+
secrets: inherit
41+
with:
42+
dist-artifact-name: ${{ needs.build.outputs.dist-filename }}
43+
push: false
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Attach artifact to release
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
artifact-name:
7+
type: string
8+
required: true
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
attach:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/download-artifact@v4
18+
with:
19+
name: ${{ inputs.artifact-name }}
20+
21+
- uses: softprops/action-gh-release@v2
22+
with:
23+
files: ${{ inputs.artifact-name }}
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Lint & test & build & publish Docker image
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [released]
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
lint-test:
13+
name: Lint & test
14+
uses: ./.github/workflows/lint-test.yml
15+
16+
build:
17+
name: Build
18+
needs: lint-test
19+
uses: ./.github/workflows/build.yml
20+
21+
attach-dist-asset:
22+
name: Attach release asset
23+
needs: build
24+
uses: ./.github/workflows/release-asset.yml
25+
with:
26+
artifact-name: ${{ needs.build.outputs.dist-filename }}
27+
28+
build-push-docker-image:
29+
name: Build & push Docker image
30+
needs: build
31+
uses: ./.github/workflows/docker-image.yml
32+
secrets: inherit
33+
with:
34+
dist-artifact-name: ${{ needs.build.outputs.dist-filename }}
35+
push: true
36+
37+
update-digma-ui:
38+
needs: [attach-dist-asset, build-push-docker-image]
39+
name: Update version in Digma UI
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Get Jaeger version
44+
run: echo "JAEGER_VERSION=$(jq -r '.version' jaeger.json)" >> $GITHUB_ENV
45+
46+
- name: Get dist artifact version name
47+
id: get-dist-filename
48+
run: echo "dist-filename=$(cat ${{ needs.build.outputs.dist-filename }})" >> $GITHUB_ENV
49+
50+
- run: |
51+
curl -X POST -H "Accept: application/vnd.github.v3+json" \
52+
-H "Authorization: token ${{ secrets.PAT }}" \
53+
https://api.github.com/repos/digma-ai/digma-ui/dispatches \
54+
-d '{
55+
"event_type":"update-jaeger",
56+
"client_payload": {
57+
"jaegerUIVersion": "'"${{ needs.build.outputs.version }}"'",
58+
"jaegerVersion": "'"${{ env.JAEGER_VERSION }}"'"
59+
}
60+
}'

.github/workflows/release-digma.yml

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)