[action] upload rpm files to aip_rpm
authorYelin Jeong <yelini.jeong@samsung.com>
Thu, 25 Aug 2022 08:01:37 +0000 (17:01 +0900)
committer추지호/NPU Lab(SR)/삼성전자 <jiho.chu@samsung.com>
Thu, 1 Sep 2022 01:19:16 +0000 (10:19 +0900)
This patch uploads rpm files to aip_rpm when release.

Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
.github/workflows/release-package-aarch64.yml [new file with mode: 0644]
.github/workflows/release-package-armv7l.yml [new file with mode: 0644]
.github/workflows/release-package-pontusm.yml [new file with mode: 0644]
.github/workflows/release-package-x86_64.yml [new file with mode: 0644]
docs/markdown/Artifactory.md

diff --git a/.github/workflows/release-package-aarch64.yml b/.github/workflows/release-package-aarch64.yml
new file mode 100644 (file)
index 0000000..abc2200
--- /dev/null
@@ -0,0 +1,44 @@
+name: release package for aarch64
+
+on:
+  workflow_dispatch:
+
+env:
+  ART_REPO: https://art.sec.samsung.net/artifactory/aip_rpm
+  ART_ID: ${{ secrets.ARTIFACTORY_ID }}
+  ART_PW: ${{ secrets.ARTIFACTORY_PW }}
+
+jobs:
+  build-and-upload-aarch64:
+    runs-on: [ code-large ]
+    container:
+      image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest
+      # for chroot-based build system
+      options: --privileged
+
+    timeout-minutes: 60
+
+    steps:
+      - name: Get current date
+        id: date
+        run: echo "::set-output name=date::$(date +'%Y%m%d')"
+      - name: Clone your repository
+        uses: CODE-Actions/checkout@v2
+      - name: Build packages
+        uses: ./.github/actions/build-tizen
+        with:
+          arch: aarch64
+          output_path: /tmp/rpms
+      - name: Upload artifacts
+        uses: CODE-Actions/upload-artifact@v2
+        with:
+          name: built-package-${{ steps.date.outputs.date }}
+          path: /tmp/rpms
+      - name: Upload to artifactory
+        uses: ./.github/actions/upload-artifacts
+        with:
+          input_path: /tmp/rpms
+          input_type: rpm
+          art_repo: $ART_REPO/aarch64
+          art_id: $ART_ID
+          art_pw: $ART_PW
diff --git a/.github/workflows/release-package-armv7l.yml b/.github/workflows/release-package-armv7l.yml
new file mode 100644 (file)
index 0000000..b70b3a3
--- /dev/null
@@ -0,0 +1,44 @@
+name: release package for armv7l
+
+on:
+  workflow_dispatch:
+
+env:
+  ART_REPO: https://art.sec.samsung.net/artifactory/aip_rpm
+  ART_ID: ${{ secrets.ARTIFACTORY_ID }}
+  ART_PW: ${{ secrets.ARTIFACTORY_PW }}
+
+jobs:
+  build-and-upload-armv7l:
+    runs-on: [ code-large ]
+    container:
+      image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest
+      # for chroot-based build system
+      options: --privileged
+
+    timeout-minutes: 60
+
+    steps:
+      - name: Get current date
+        id: date
+        run: echo "::set-output name=date::$(date +'%Y%m%d')"
+      - name: Clone your repository
+        uses: CODE-Actions/checkout@v2
+      - name: Build packages
+        uses: ./.github/actions/build-tizen
+        with:
+          arch: armv7l
+          output_path: /tmp/rpms
+      - name: Upload artifacts
+        uses: CODE-Actions/upload-artifact@v2
+        with:
+          name: built-package-${{ steps.date.outputs.date }}
+          path: /tmp/rpms
+      - name: Upload to artifactory
+        uses: ./.github/actions/upload-artifacts
+        with:
+          input_path: /tmp/rpms
+          input_type: rpm
+          art_repo: $ART_REPO/armv7l
+          art_id: $ART_ID
+          art_pw: $ART_PW
diff --git a/.github/workflows/release-package-pontusm.yml b/.github/workflows/release-package-pontusm.yml
new file mode 100644 (file)
index 0000000..21b1bc6
--- /dev/null
@@ -0,0 +1,43 @@
+name: release package for pontusm
+
+on:
+  workflow_dispatch:
+
+env:
+  ART_REPO: https://art.sec.samsung.net/artifactory/aip_rpm
+  ART_ID: ${{ secrets.ARTIFACTORY_ID }}
+  ART_PW: ${{ secrets.ARTIFACTORY_PW }}
+
+jobs:
+  build-and-upload-pontusm:
+    runs-on: [ code-large ]
+    container:
+      image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest
+      # for chroot-based build system
+      options: --privileged
+
+    timeout-minutes: 60
+
+    steps:
+      - name: Get current date
+        id: date
+        run: echo "::set-output name=date::$(date +'%Y%m%d')"
+      - name: Clone your repository
+        uses: CODE-Actions/checkout@v2
+      - name: Build packages
+        uses: ./.github/actions/build-pontusm
+        with:
+          output_path: /tmp/rpms
+      - name: Upload artifacts
+        uses: CODE-Actions/upload-artifact@v2
+        with:
+          name: built-package-${{ steps.date.outputs.date }}
+          path: /tmp/rpms
+      - name: Upload to artifactory
+        uses: ./.github/actions/upload-artifacts
+        with:
+          input_path: /tmp/rpms
+          input_type: rpm
+          art_repo: $ART_REPO/pontusm
+          art_id: $ART_ID
+          art_pw: $ART_PW
diff --git a/.github/workflows/release-package-x86_64.yml b/.github/workflows/release-package-x86_64.yml
new file mode 100644 (file)
index 0000000..fc45e81
--- /dev/null
@@ -0,0 +1,43 @@
+name: release package for x86_64
+
+on:
+  workflow_dispatch:
+env:
+  ART_REPO: https://art.sec.samsung.net/artifactory/aip_rpm
+  ART_ID: ${{ secrets.ARTIFACTORY_ID }}
+  ART_PW: ${{ secrets.ARTIFACTORY_PW }}
+
+jobs:
+  build-and-upload-x86_64:
+    runs-on: [ code-large ]
+    container:
+      image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest
+      # for chroot-based build system
+      options: --privileged
+
+    timeout-minutes: 60
+
+    steps:
+      - name: Get current date
+        id: date
+        run: echo "::set-output name=date::$(date +'%Y%m%d')"
+      - name: Clone your repository
+        uses: CODE-Actions/checkout@v2
+      - name: Build packages
+        uses: ./.github/actions/build-tizen
+        with:
+          arch: x86_64
+          output_path: /tmp/rpms
+      - name: Upload artifacts
+        uses: CODE-Actions/upload-artifact@v2
+        with:
+          name: built-package-${{ steps.date.outputs.date }}
+          path: /tmp/rpms
+      - name: Upload to artifactory
+        uses: ./.github/actions/upload-artifacts
+        with:
+          input_path: /tmp/rpms
+          input_type: rpm
+          art_repo: $ART_REPO/x86_64
+          art_id: $ART_ID
+          art_pw: $ART_PW
index f69dfdb..745d187 100644 (file)
@@ -34,3 +34,55 @@ apptests  unittests
 $ ls /opt/trinity/share/npu-engine/testdata
 TRIV221_8TOPS  TRIV238_2TOPS
 ```
+
+# Artifactory RPM Repository
+
+[Artifactory](https://art.sec.samsung.net/ui/packages) supports RPM repositories which can be accessed by the existing `yum`, `zypper` tool.
+
+## Configuration
+
+To resolve .rpm files using the YUM client, edit or create the artifactory.repo file with root privileges:
+```console
+$ sudo vi /etc/yum.repos.d/artifactory.repo
+```
+Then edit the baseurl to point to the path of the repodata folder according to configured repository depth.
+If the configured depth is 0 the baseurl should point to the root of the repository.
+```
+[Artifactory]
+name=Artifactory
+baseurl=https://art.sec.samsung.net/artifactory/aip_rpm
+enabled=1
+gpgcheck=0
+```
+
+To resolve .rpm files using the Zypper client, use addrepo command.
+```console
+$ sudo zypper addrepo https://art.sec.samsung.net/artifactory/aip_rpm artifactory
+$ sudo zypper refresh
+```
+
+## Installation
+
+Then, you can easily download and install our packages in RPM dists.
+
+Using Yum
+```console
+$ yum list
+Available Packages
+npu-engine.x86_64           2.5.1-0     Artifactory
+npu-engine-devel.x86_64     2.5.1-0     Artifactory
+npu-engine-example.x86_64   2.5.1-0     Artifactory
+npu-engine-utils.x86_64     2.5.1-0     Artifactory
+$ yum install npu-engine
+```
+
+Using Zypper
+```console
+$ zypper search -s | grep artifactory
+  | npu-engine         | package | 2.5.1-0 | x86_64 | artifactory
+  | npu-engine-devel   | package | 2.5.1-0 | x86_64 | artifactory
+  | npu-engine-example | package | 2.5.1-0 | x86_64 | artifactory
+  | npu-engine-utils   | package | 2.5.1-0 | x86_64 | artifactory
+$ sudo zypper install npu-engine
+```
+