You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by li...@apache.org on 2022/12/09 02:39:07 UTC

[skywalking-rover] branch compatibility-gha created (now 88bc162)

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

liuhan pushed a change to branch compatibility-gha
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git


      at 88bc162  Add how to use the compatibility GitHub Action explain

This branch includes the following new commits:

     new 88bc162  Add how to use the compatibility GitHub Action explain

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking-rover] 01/01: Add how to use the compatibility GitHub Action explain

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liuhan pushed a commit to branch compatibility-gha
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git

commit 88bc162ff6d628592ffa5daa98d3efc412e8654f
Author: mrproliu <74...@qq.com>
AuthorDate: Fri Dec 9 10:39:02 2022 +0800

    Add how to use the compatibility GitHub Action explain
---
 .github/workflows/compatibility.yaml | 39 +++++++++++++++++++++++++++---------
 1 file changed, 29 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/compatibility.yaml b/.github/workflows/compatibility.yaml
index 477c970..9ca0074 100644
--- a/.github/workflows/compatibility.yaml
+++ b/.github/workflows/compatibility.yaml
@@ -16,7 +16,23 @@
 
 name: Compatibility Checks
 
-on: workflow_dispatch
+# This GitHub Action Is helps to check the compatibility on the GCP
+# Please provide following data to running:
+# 1. Secret.GCP_SERVICE_ACCOUNT_CREDENTIALS: The Key of the service account in Gcloud. The account must could operate GCloud Storage and GCP machine instance.
+# 2. GCloud project name: The name of the GCloud project, which use to create GCP under the project.
+# 3. GCloud storage name: The name of the GCloud storage, which use to update the checker files and check result of compatibility.
+
+on:
+  workflow_dispatch:
+    inputs:
+      gcloud-project:
+        description: 'Which project(ID) to create GCP?'
+        type: string
+        required: true
+      gcloud-storage:
+        description: 'Which GCloud Storage(Name) to storage compatibility result?'
+        type: string
+        required: true
 
 jobs:
   upload-checkers:
@@ -49,7 +65,7 @@ jobs:
           mv demo demo-program
           
           # upload to the gcloud
-          gcloud storage cp ./* gs://skywalking-rover-compatibility/runner
+          gcloud storage cp  --project "${{ github.event.inputs.gcloud-project }}" ./* gs://${{ github.event.inputs.gcloud-storage }}/runner
 
   checks:
     name: Compatibility Checks
@@ -181,26 +197,29 @@ jobs:
         run: |
           # download the runner
           mkdir -p /tmp/runner
-          gcloud storage cp gs://skywalking-rover-compatibility/runner/* /tmp/runner
+          gcloud storage cp gs://${{ github.event.inputs.gcloud-storage }}/runner/* /tmp/runner
           
           # create instance
           gcloud compute instances create "skywalking-rover-test-$INSTANCE_IMAGE" --image "$INSTANCE_IMAGE" \
-          	--image-project "$INSTANCE_PROJECT" --machine-type e2-medium --zone us-west1-b
+          	--project "${{ github.event.inputs.gcloud-project }}" --image-project "$INSTANCE_PROJECT" --machine-type e2-medium --zone us-west1-b
           
           # generate the public ssh key
           ssh-keygen -b 2048 -t rsa -f /tmp/sshkey -f ~/.ssh/google_compute_engine -q -N ""
           
           # scp runner
-          gcloud compute scp --recurse /tmp/runner hanliu@"skywalking-rover-test-$INSTANCE_IMAGE":/tmp/ --zone us-west1-b
+          gcloud compute scp --recurse /tmp/runner test@"skywalking-rover-test-$INSTANCE_IMAGE":/tmp/ \
+            --zone us-west1-b --project "${{ github.event.inputs.gcloud-project }}" 
           
           # run checker
-          gcloud compute ssh --zone "us-west1-b" "hanliu@skywalking-rover-test-$INSTANCE_IMAGE" \
-            --project "skywalking-live-demo" \
+          gcloud compute ssh --zone "us-west1-b" "test@skywalking-rover-test-$INSTANCE_IMAGE" \
+            --project "${{ github.event.inputs.gcloud-project }}" \
             --command "cd /tmp/runner; chmod +x /tmp/runner/demo-program /tmp/runner/skywalking-rover-latest-linux-amd64; sudo bash check.sh /tmp/runner/config.yaml /tmp/runner/demo-program /tmp/runner/skywalking-rover-latest-linux-amd64 /tmp/runner/result/$INSTANCE_SYSTEM/$INSTANCE_FAMILY json"
           
           # scp from instance and upload to the storage
-          gcloud compute scp --recurse hanliu@"skywalking-rover-test-$INSTANCE_IMAGE":/tmp/runner/result /tmp/runner --zone us-west1-b
-          gcloud storage cp -r /tmp/runner/result gs://skywalking-rover-compatibility/
+          gcloud compute scp --recurse test@"skywalking-rover-test-$INSTANCE_IMAGE":/tmp/runner/result /tmp/runner \
+            --zone us-west1-b  --project "${{ github.event.inputs.gcloud-project }}" 
+          gcloud storage cp -r /tmp/runner/result gs://"${{ github.event.inputs.gcloud-storage }}"/ \
+            --project "${{ github.event.inputs.gcloud-project }}" 
 
           # delete test instance
-          gcloud compute instances delete "skywalking-rover-test-$INSTANCE_IMAGE" --zone us-west1-b -q
\ No newline at end of file
+          gcloud compute instances delete --project "${{ github.event.inputs.gcloud-project }}" "skywalking-rover-test-$INSTANCE_IMAGE" --zone us-west1-b -q