diff --git a/.github/workflows/pr-for-updates.yaml b/.github/workflows/pr-for-updates.yaml index b53226ef..86c9ea96 100644 --- a/.github/workflows/pr-for-updates.yaml +++ b/.github/workflows/pr-for-updates.yaml @@ -1,58 +1,11 @@ --- -name: Release +name: Pull Request on update/* Branch Push on: - workflow_run: - types: - - completed - workflows: - - "ci" + push: + branches: + - update/** jobs: - print-debug-info: - name: Print debug info for Release workflow - runs-on: ubuntu-latest - steps: - - uses: hmarr/debug-action@v2 - - get-tag: - name: Get tag - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.head_branch, 'release/') }} - outputs: - tag: ${{ steps.get-tag-step.outputs.tag }} - steps: - - name: Get tag - run: | - branch=${{github.event.workflow_run.head_branch}} - echo '::set-output name=tag::'${branch#release/} - id: get-tag-step - - create-release: - name: Create release - needs: get-tag - uses: networkservicemesh/.github/.github/workflows/release.yaml@main - with: - tag: ${{ needs.get-tag.outputs.tag }} - secrets: - token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} - - release-dependent-repositories: - name: Release dependent repositories - needs: [get-tag, create-release] - uses: networkservicemesh/.github/.github/workflows/release-dependent-repositories.yaml@main - with: - tag: ${{ needs.get-tag.outputs.tag }} - dependent_repositories: | - ["sdk-k8s", - "sdk-kernel", - "cmd-nsmgr", - "cmd-nsmgr-proxy", - "cmd-registry-memory", - "cmd-registry-proxy-dns", - "cmd-nse-remote-vlan", - "cmd-nse-vfio", - "cmd-nsc-init", - "cmd-ipam-vl3", - "cmd-map-ip-k8s", - "cmd-admission-webhook-k8s"] + auto-pull-request: + uses: networkservicemesh/.github/.github/workflows/pr-for-updates.yaml@main secrets: token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2edcceb5..8f35e826 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,12 +5,42 @@ on: types: - completed workflows: - - 'ci' + - "ci" jobs: - release: + print-debug-info: + name: Print debug info for Release workflow + runs-on: ubuntu-latest + steps: + - uses: hmarr/debug-action@v2 + + get-tag: + name: Get tag + runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.head_branch, 'release/') }} + outputs: + tag: ${{ steps.get-tag-step.outputs.tag }} + steps: + - name: Get tag + run: | + branch=${{github.event.workflow_run.head_branch}} + echo '::set-output name=tag::'${branch#release/} + id: get-tag-step + + create-release: + name: Create release + needs: get-tag uses: networkservicemesh/.github/.github/workflows/release.yaml@main with: + tag: ${{ needs.get-tag.outputs.tag }} + secrets: + token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} + + release-dependent-repositories: + name: Release dependent repositories + needs: [get-tag, create-release] + uses: networkservicemesh/.github/.github/workflows/release-dependent-repositories.yaml@main + with: + tag: ${{ needs.get-tag.outputs.tag }} dependent_repositories: | ["cmd-forwarder-sriov", "cmd-nsc", @@ -19,6 +49,5 @@ jobs: "cmd-forwarder-vpp", "cmd-nse-vlan-vpp", "sdk-ovs"] - secrets: token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/update-dependent-repositories-gomod.yaml b/.github/workflows/update-dependent-repositories-gomod.yaml index 1f98990c..17e9c5fa 100644 --- a/.github/workflows/update-dependent-repositories-gomod.yaml +++ b/.github/workflows/update-dependent-repositories-gomod.yaml @@ -10,7 +10,7 @@ on: workflows: - 'automerge' jobs: - release: + update-dependent-repos: if: ${{ github.event.workflow_run.conclusion == 'success' && github.actor == 'nsmbot' || github.event_name == 'push' }} uses: networkservicemesh/.github/.github/workflows/update-dependent-repositories-gomod.yaml@main with: diff --git a/pkg/networkservice/common/mechanisms/vfio/client_test.go b/pkg/networkservice/common/mechanisms/vfio/client_test.go index f2d89fe8..00731547 100644 --- a/pkg/networkservice/common/mechanisms/vfio/client_test.go +++ b/pkg/networkservice/common/mechanisms/vfio/client_test.go @@ -46,6 +46,7 @@ import ( const ( serverSocket = "server.socket" cgroupDir = "cgroup_dir" + iommuGroup = 1 ) func testServer(ctx context.Context, tmpDir string) (*grpc.ClientConn, error) { diff --git a/pkg/networkservice/common/mechanisms/vfio/const_test.go b/pkg/networkservice/common/mechanisms/vfio/const_test.go index 808210e3..08b819a7 100644 --- a/pkg/networkservice/common/mechanisms/vfio/const_test.go +++ b/pkg/networkservice/common/mechanisms/vfio/const_test.go @@ -1,5 +1,7 @@ // Copyright (c) 2020-2021 Doc.ai and/or its affiliates. // +// Copyright (c) 2022 Cisco and/or its affiliates. +// // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,6 +20,5 @@ package vfio_test const ( vfioDevice = "vfio" - iommuGroup = 1 iommuGroupString = "1" )