Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,38 @@
# limitations under the License.
#

name: Deploy Production
name: Deploy to Production

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version tag to deploy (e.g., v1.0.0)'
required: true
type: string
workflow_run:
workflows: ["Build Release Images"]
types:
- completed

jobs:
deploy:
runs-on: ubuntu-latest

if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Extract version
id: vars
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Get version
id: version
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
else
echo "VERSION=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT
fi

- name: SSH Deploy
uses: appleboy/ssh-action@v1.0.3
env:
DEPLOY_VERSION: ${{ steps.vars.outputs.VERSION }}
DEPLOY_VERSION: ${{ steps.version.outputs.VERSION }}
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
Expand All @@ -43,5 +55,7 @@ jobs:
script: |
cd /opt/devlake
sed -i "s/^APP_VERSION=.*/APP_VERSION=${DEPLOY_VERSION}/" .env
docker pull jawad4khan/devlake:${DEPLOY_VERSION}
./deploy.sh
sudo docker pull jawad4khan/devlake:${DEPLOY_VERSION}
sudo docker pull jawad4khan/devlake-config-ui:${DEPLOY_VERSION}
sudo ./deploy.sh

80 changes: 73 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,97 @@
# limitations under the License.
#

name: Build Release Image
name: Build Release Images

on:
push:
tags:
- 'v*'

jobs:
build-image:
build-backend:
name: Build DevLake Backend
runs-on: ubuntu-latest

steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
docker system prune -af
docker volume prune -f

- uses: actions/checkout@v4

- name: Extract tag
id: vars
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
run: |
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push Image
- name: Build and Push devlake backend image
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: jawad4khan/devlake:${{ steps.vars.outputs.TAG }}
platforms: linux/amd64
cache-from: |
apache/devlake:amd64-builder
apache/devlake:base
build-args: |
TAG=${{ steps.vars.outputs.TAG }}
SHA=${{ steps.vars.outputs.SHORT_SHA }}

build-config-ui:
name: Build DevLake Config UI
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
docker system prune -af
docker volume prune -f

- uses: actions/checkout@v4

- name: Extract tag
id: vars
run: |
docker build -t jawad4khan/devlake:${{ steps.vars.outputs.TAG }} ./backend
docker push jawad4khan/devlake:${{ steps.vars.outputs.TAG }}
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push config-ui image
uses: docker/build-push-action@v5
with:
context: ./config-ui
push: true
tags: jawad4khan/devlake-config-ui:${{ steps.vars.outputs.TAG }}
platforms: linux/amd64
17 changes: 17 additions & 0 deletions backend/plugins/developer_telemetry/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# Developer Telemetry Plugin for Apache DevLake

## Overview
Expand Down
2 changes: 2 additions & 0 deletions backend/plugins/table_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
circleci "github.com/apache/incubator-devlake/plugins/circleci/impl"
customize "github.com/apache/incubator-devlake/plugins/customize/impl"
dbt "github.com/apache/incubator-devlake/plugins/dbt/impl"
developer_telemetry "github.com/apache/incubator-devlake/plugins/developer_telemetry/impl"
dora "github.com/apache/incubator-devlake/plugins/dora/impl"
feishu "github.com/apache/incubator-devlake/plugins/feishu/impl"
gitee "github.com/apache/incubator-devlake/plugins/gitee/impl"
Expand Down Expand Up @@ -71,6 +72,7 @@ func Test_GetPluginTablesInfo(t *testing.T) {
checker.FeedIn("argocd/models", argocd.ArgoCD{}.GetTablesInfo)
checker.FeedIn("customize/models", customize.Customize{}.GetTablesInfo)
checker.FeedIn("dbt", dbt.Dbt{}.GetTablesInfo)
checker.FeedIn("developer_telemetry/models", developer_telemetry.DeveloperTelemetry{}.GetTablesInfo)
checker.FeedIn("dora/models", dora.Dora{}.GetTablesInfo)
checker.FeedIn("feishu/models", feishu.Feishu{}.GetTablesInfo)
checker.FeedIn("gitee/models", gitee.Gitee{}.GetTablesInfo)
Expand Down
Loading