You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by zh...@apache.org on 2022/08/24 04:20:31 UTC

[incubator-devlake] branch main updated: Fix latest tag never get updated (#2819)

This is an automated email from the ASF dual-hosted git repository.

zhangliang2022 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new f74c8cfe Fix latest tag never get updated (#2819)
f74c8cfe is described below

commit f74c8cfe8cefab78407b016b6ae7d8056fc29d9b
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Wed Aug 24 12:20:26 2022 +0800

    Fix latest tag never get updated (#2819)
    
    * ci: try fixing latest tag
    
    * fix: grafana image name
    
    * chore: api requesting scripts
---
 .github/workflows/build.yml           |  15 +-
 scripts/pm/github/create-blueprint.sh | 493 ++++++++++++++++++++++++++++++++++
 scripts/pm/jira/board.sh              |  25 ++
 scripts/pm/jira/boards.sh             |  23 ++
 4 files changed, 549 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9889f9dc..b66e08c0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -28,7 +28,7 @@ on:
       - 'v*'
 jobs:
   build-lake:
-    name: Build lake image
+    name: Build and Push lake image
     runs-on: ubuntu-20.04
     steps:
       - uses: actions/checkout@v2
@@ -49,11 +49,12 @@ jobs:
           docker build -t ${{ env.IMAGE_LAKE }}:latest --file ./Dockerfile .
           docker tag ${{ env.IMAGE_LAKE }}:latest ${{ env.IMAGE_LAKE }}:${{ github.ref_name }}
           docker push ${{ env.IMAGE_LAKE }}:${{ github.ref_name }}
-          if printf {{ github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
+          if printf ${{ github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
+            echo "push latest tag"
             docker push ${{ env.IMAGE_LAKE }}:latest
           fi
   build-configui:
-    name: Build config-ui image
+    name: Build and Push config-ui image
     runs-on: ubuntu-20.04
     steps:
       - uses: actions/checkout@v2
@@ -74,11 +75,11 @@ jobs:
           docker build -t ${{ env.IMAGE_CONFIG_UI }}:latest --file ./Dockerfile .
           docker tag ${{ env.IMAGE_CONFIG_UI }}:latest ${{ env.IMAGE_CONFIG_UI }}:${{ github.ref_name }}
           docker push ${{ env.IMAGE_CONFIG_UI }}:${{ github.ref_name }}
-          if printf {{ github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
+          if printf ${{ github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
             docker push ${{ env.IMAGE_CONFIG_UI }}:latest
           fi
   build-grafana:
-    name: Build grafana image
+    name: Build and Push grafana image
     runs-on: ubuntu-20.04
     steps:
       - uses: actions/checkout@v2
@@ -99,6 +100,6 @@ jobs:
           docker build -t ${{ env.IMAGE_GRAFANA }}:latest --file ./Dockerfile .
           docker tag ${{ env.IMAGE_GRAFANA }}:latest ${{ env.IMAGE_GRAFANA }}:${{ github.ref_name }}
           docker push ${{ env.IMAGE_GRAFANA }}:${{ github.ref_name }}
-          if printf {{ github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
-            docker push ${{ env.IMAGE_DASHBOARD }}:latest
+          if printf ${{ github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
+            docker push ${{ env.IMAGE_GRAFANA }}:latest
           fi
diff --git a/scripts/pm/github/create-blueprint.sh b/scripts/pm/github/create-blueprint.sh
new file mode 100755
index 00000000..be15d438
--- /dev/null
+++ b/scripts/pm/github/create-blueprint.sh
@@ -0,0 +1,493 @@
+#!/bin/sh
+#
+# 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.
+#
+
+. "$(dirname $0)/../vars/active-vars.sh"
+
+curl -sv $LAKE_ENDPOINT/blueprints \
+    -H "Content-Type: application/json" \
+    --data @- <<JSON | jq
+{
+	"cronConfig": "0 0 * * 1",
+	"enable": true,
+	"isManual": true,
+	"mode": "ADVANCED",
+	"name": "My GitHub Blueprint",
+	"plan": [
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-objc",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-kotlin",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-php",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-swift",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-c-sharp",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-rust",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-javascript",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-vue",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-typescript",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "sonarqube",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-scala",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-java",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-jsp",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-python",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-go",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-ruby",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "datasketch",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "py-tree-sitter",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "node-pg-copy-streams-binary",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "ratcal",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "create-git-repository",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "example-repository",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-dart",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "trino-minio-docker",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "build",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "build-frontend",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "common-backend",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "charts",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "node-native-metrics",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "OpenMARI",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-cobol",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-cpp",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "react-native-netinfo",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "website-docs",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "precise-testing-cases",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "docs-cn",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "build-your-own-radar",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "stream",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-json",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "lake",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "tree-sitter-sql",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "incubator-devlake-website",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "mapi",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "test_large_js2",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "jde-program",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		],
+		[
+			{
+				"plugin": "github",
+				"options": {
+					"repo": "graphql",
+					"owner": "merico-dev",
+					"connectionId": 1
+				}
+			}
+		]
+	]
+}
+JSON
diff --git a/scripts/pm/jira/board.sh b/scripts/pm/jira/board.sh
new file mode 100755
index 00000000..e8c480d8
--- /dev/null
+++ b/scripts/pm/jira/board.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# 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.
+#
+
+. "$(dirname $0)/../vars/active-vars.sh"
+
+board_id=${1-"68"}
+
+curl -sv $JIRA_ENDPOINT/agile/1.0/board/$board_id \
+    -H "Authorization: Basic $JIRA_BASIC_AUTH" \
+    | jq
diff --git a/scripts/pm/jira/boards.sh b/scripts/pm/jira/boards.sh
new file mode 100755
index 00000000..b4ef5645
--- /dev/null
+++ b/scripts/pm/jira/boards.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# 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.
+#
+
+. "$(dirname $0)/../vars/active-vars.sh"
+
+curl -sv $JIRA_ENDPOINT/agile/1.0/board \
+    -H "AUTHORIZATION: Basic $JIRA_BASIC_AUTH" \
+    | jq