Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release and pr-for-updates workflows #430

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of this commit - 9d3fdb5
Need to figure out how to avoid this problem.

Copy link
Contributor Author

@NikitaSkrynnik NikitaSkrynnik Jun 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just move this constant to client_test.go file

iommuGroupString = "1"
)