Skip to content

Commit

Permalink
Merge pull request #430 from NikitaSkrynnik/fix-reusable-workflows
Browse files Browse the repository at this point in the history
Fix release and pr-for-updates workflows
  • Loading branch information
denis-tingaikin authored Jul 1, 2022
2 parents 5eb8318 + 9dd41cd commit def85c9
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 58 deletions.
59 changes: 6 additions & 53 deletions .github/workflows/pr-for-updates.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
35 changes: 32 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -19,6 +49,5 @@ jobs:
"cmd-forwarder-vpp",
"cmd-nse-vlan-vpp",
"sdk-ovs"]
secrets:
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/update-dependent-repositories-gomod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions pkg/networkservice/common/mechanisms/vfio/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import (
const (
serverSocket = "server.socket"
cgroupDir = "cgroup_dir"
iommuGroup = 1
)

func testServer(ctx context.Context, tmpDir string) (*grpc.ClientConn, error) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/networkservice/common/mechanisms/vfio/const_test.go
Original file line number Diff line number Diff line change
@@ -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");
Expand All @@ -18,6 +20,5 @@ package vfio_test

const (
vfioDevice = "vfio"
iommuGroup = 1
iommuGroupString = "1"
)

0 comments on commit def85c9

Please sign in to comment.