You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/04/16 01:48:55 UTC

[GitHub] [apisix-dashboard] starsz commented on a change in pull request #1766: feat: support auto build rpm package for dashboard

starsz commented on a change in pull request #1766:
URL: https://github.com/apache/apisix-dashboard/pull/1766#discussion_r614505087



##########
File path: .github/workflows/auto-build-rpm.yml
##########
@@ -0,0 +1,69 @@
+name: Auto Build RPM
+
+on:
+  push:
+    branches: [master, 'release/**']
+    paths-ignore:
+      - 'docs/**'
+  pull_request:
+    branches: [master]
+    paths-ignore:
+      - 'docs/**'
+
+jobs:
+  auto_build_rpm:
+    name: auto build rpm package
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+    steps:
+    - name: Check out code
+      uses: actions/checkout@v2
+
+    - name: Extract branch name
+      if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
+      id: branch_env
+      shell: bash
+      run: |
+        echo "##[set-output name=version;]$(echo ${GITHUB_REF##*/})"
+
+    - name: Build rpm package
+      run: |
+        export VERSION=2.5

Review comment:
       Hard code ?

##########
File path: .github/workflows/auto-build-rpm.yml
##########
@@ -0,0 +1,69 @@
+name: Auto Build RPM
+
+on:
+  push:
+    branches: [master, 'release/**']
+    paths-ignore:
+      - 'docs/**'
+  pull_request:
+    branches: [master]
+    paths-ignore:
+      - 'docs/**'
+
+jobs:
+  auto_build_rpm:
+    name: auto build rpm package
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+    steps:
+    - name: Check out code
+      uses: actions/checkout@v2
+
+    - name: Extract branch name
+      if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
+      id: branch_env
+      shell: bash
+      run: |
+        echo "##[set-output name=version;]$(echo ${GITHUB_REF##*/})"
+
+    - name: Build rpm package
+      run: |
+        export VERSION=2.5
+        sudo gem install --no-document fpm
+        git clone https://github.com/api7/apisix-build-tools.git
+        cd apisix-build-tools
+        make package type=rpm app=dashboard version=${VERSION} checkout=release/${VERSION}
+
+    - name: Run centos7 docker and mapping apisix into container
+      run: |
+        docker run -itd -v $PWD:/apisix-dashboard --name centos7Instance --net="host" docker.io/centos:7 /bin/bash
+
+    - name: Install rpm package
+      run: |
+        export VERSION=2.5

Review comment:
       Hard code ?

##########
File path: .github/workflows/auto-build-rpm.yml
##########
@@ -0,0 +1,69 @@
+name: Auto Build RPM
+
+on:
+  push:
+    branches: [master, 'release/**']
+    paths-ignore:
+      - 'docs/**'
+  pull_request:
+    branches: [master]
+    paths-ignore:
+      - 'docs/**'
+
+jobs:
+  auto_build_rpm:
+    name: auto build rpm package
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+    steps:
+    - name: Check out code
+      uses: actions/checkout@v2
+
+    - name: Extract branch name
+      if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
+      id: branch_env
+      shell: bash
+      run: |
+        echo "##[set-output name=version;]$(echo ${GITHUB_REF##*/})"
+
+    - name: Build rpm package
+      run: |
+        export VERSION=2.5
+        sudo gem install --no-document fpm
+        git clone https://github.com/api7/apisix-build-tools.git
+        cd apisix-build-tools
+        make package type=rpm app=dashboard version=${VERSION} checkout=release/${VERSION}
+
+    - name: Run centos7 docker and mapping apisix into container
+      run: |
+        docker run -itd -v $PWD:/apisix-dashboard --name centos7Instance --net="host" docker.io/centos:7 /bin/bash
+
+    - name: Install rpm package
+      run: |
+        export VERSION=2.5
+        docker exec centos7Instance bash -c "cd apisix-dashboard && yum install -y ./apisix-build-tools/output/apisix-dashboard-${VERSION}-0.x86_64.rpm"
+        docker logs centos7Instance
+        # Dependencies are attached with rpm, so revert `make deps`
+        docker exec centos7Instance bash -c "cd /usr/local/apisix/dashboard/ && nohup ./manager-api &"
+
+    - name: Run test cases
+      run: |
+        ls -l
+        pwd

Review comment:
       Debug lines?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org