[action] use bart repository when release debian packages
authorYelin Jeong <yelini.jeong@samsung.com>
Mon, 21 Nov 2022 03:20:27 +0000 (12:20 +0900)
committer추지호/NPU Lab(SR)/삼성전자 <jiho.chu@samsung.com>
Thu, 1 Dec 2022 02:06:35 +0000 (11:06 +0900)
This patch changes to use bart repository from artifcatory when releasing debian packages.
`artifacts-ubuntu` must be triggered to release new version.

Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
.github/workflows/artifacts-ubuntu.yml

index 5f602c4626c714c8135d877881286b196e6a3256..b76dbffd17a9accba80665d79c6bf3192ad8667a 100644 (file)
@@ -3,9 +3,9 @@ name: artifacts-ubuntu
 on: workflow_dispatch
 
 env:
-  ART_REPO: https://art.sec.samsung.net/artifactory/aip_debian
-  ART_ID: ${{ secrets.ARTIFACTORY_ID }}
-  ART_PW: ${{ secrets.ARTIFACTORY_PW }}
+  BART_REPO: https://bart.sec.samsung.net/artifactory/aip-debian-local
+  BART_ID: ${{ secrets.BART_ID }}
+  BART_PW: ${{ secrets.BART_PW }}
 
 jobs:
   upload-bionic:
@@ -34,25 +34,25 @@ jobs:
         with:
           name: debian packages for Bionic
           path: npu-engine*.deb
-      - name: Upload packages to Artifactory
-        shell: bash
-        run: |
-          for FILE in `find . -name "npu-engine*.deb" -type f -exec basename {} \;`; do \
-            curl \
-              --header "X-Checksum-MD5:`md5sum $FILE | awk '{ print $1 }'`" \
-              --header "X-Checksum-Sha1:`shasum -a 1 $FILE | awk '{ print $1 }'`" \
-              -u$ART_ID:$ART_PW \
-              -XPUT "$ART_REPO/pool/$DISTRO/$FILE;deb.distribution=$DISTRO;deb.component=universe;deb.architecture=amd64" \
-              -T $FILE \
-            ;\
-          done
-        env:
-          DISTRO: bionic-nightly
+      - name: Upload to artifactory
+        uses: ./.github/actions/upload-artifacts
+        with:
+          input_path: .
+          input_type: deb
+          art_repo: $BART_REPO/pool/bionic-nightly
+          art_id: $BART_ID
+          art_pw: $BART_PW
 
   upload-focal:
     # CODE-hosted runner
     runs-on: [ code-medium ]
-    container: art.sec.samsung.net/aip_docker/n2s2_docker/focal:latest
+    container:
+      image: aip-docker-local.bart.sec.samsung.net/n2s2_docker/focal:latest
+      # for chroot-based build system
+      options: --privileged
+      credentials:
+        username: ${{ secrets.BART_ID }}
+        password : ${{ secrets.BART_PW }}
     timeout-minutes: 30
 
     steps:
@@ -69,17 +69,11 @@ jobs:
         with:
           name: debian packages for Focal
           path: npu-engine*.deb
-      - name: Upload packages to Artifactory
-        shell: bash
-        run: |
-          for FILE in `find . -name "npu-engine*.deb" -type f -exec basename {} \;`; do \
-            curl \
-              --header "X-Checksum-MD5:`md5sum $FILE | awk '{ print $1 }'`" \
-              --header "X-Checksum-Sha1:`shasum -a 1 $FILE | awk '{ print $1 }'`" \
-              -u$ART_ID:$ART_PW \
-              -XPUT "$ART_REPO/pool/$DISTRO/$FILE;deb.distribution=$DISTRO;deb.component=universe;deb.architecture=amd64" \
-              -T $FILE \
-            ;\
-          done
-        env:
-          DISTRO: focal-nightly
+      - name: Upload to artifactory
+        uses: ./.github/actions/upload-artifacts
+        with:
+          input_path: .
+          input_type: deb
+          art_repo: $BART_REPO/pool/focal-nightly
+          art_id: $BART_ID
+          art_pw: $BART_PW