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

task: update documentation for PR 3 #19

Closed
wants to merge 5 commits into from
Closed
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: 49 additions & 10 deletions .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,42 @@ on:
git_tag:
type: string
description: The git tag (version) from the calling workflow
required: true
required: false
# ref_type:
# type: string
# description: ref type
# required: false
# ref_name:
# type: string
# description: ref name
# required: false
# event_type:
# type: string
# description: event type
# required: false
# secrets:
# token:
# description: The github token
# required: false
workflow_dispatch:
inputs:
git_tag:
type: string
description: The git tag (version) to use for `$TAG`
required: true
required: false

jobs:
docs-ci:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
TAG: ${{ inputs.git_tag }}
REF_NAME: ${{ github.ref_name }}
REF_TYPE: ${{ github.ref_type }}
REF_HEAD: ${{ github.head_ref }}
PR_NUMBER: ${{ github.event.number }}
PR_TITLE_PREFIX: "task: update documentation for"
COMMIT_SUFFIX: ${{ inputs.git_tag }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -32,6 +53,20 @@ jobs:
go-version: 1.23.x
- name: Make docs
run: |
echo "REF_TYPE:" $REF_TYPE
echo "REF_NAME:" $REF_NAME
echo "REF_HEAD:" $REF_HEAD
if [[ -n $PR_NUMBER ]]; then
echo PR_NUMBER=$PR_NUMBER
export PR_BRANCH=$REF_HEAD
echo "COMMIT_SUFFIX=PR $PR_NUMBER" >> $GITHUB_ENV
fi

COMMIT_SUFFIX="PR 3" >> $GITHUB_ENV

echo "PR_BRANCH:" $PR_BRANCH
git pull
git checkout test-netops-docs-workflow #$REF_HEAD
make api-docs helm-docs generate-docs-versions-var
- name: Close any existing documentation PRs
run: |
Expand All @@ -40,20 +75,24 @@ jobs:
done
- name: Create PR
env:
DOWNSTREAM_REPO_OWNER: nvidia-ci-cd
DOWNSTREAM_FEATURE_BRANCH: update-docs-for-${{ env.TAG }}
UPSTREAM_REPO_OWNER: Mellanox
REF_NAME: ${{ github.ref_name }}
DOWNSTREAM_REPO_OWNER: heyvister1
DOWNSTREAM_FEATURE_BRANCH: update-docs-for-${{ env.REF_NAME }}
UPSTREAM_REPO_OWNER: heyvister1
UPSTREAM_DEFAULT_BRANCH: main
COMMIT_MESSAGE: ${{ env.PR_TITLE_PREFIX }} ${{ env.TAG }}
#COMMIT_MESSAGE: ${{ env.PR_TITLE_PREFIX }} ${{ env.COMMIT_SUFFIX }}
run: |
git config user.name nvidia-ci-cd
git config user.email svc-cloud-orch-gh@nvidia.com
gh repo fork --remote --default-branch-only
git config user.name heyvister1
git config user.email iheyvi@nvidia.com
#gh repo fork --remote --default-branch-only
gh repo sync $DOWNSTREAM_REPO_OWNER/network-operator-docs --source $UPSTREAM_REPO_OWNER/network-operator-docs --branch $UPSTREAM_DEFAULT_BRANCH


git pull
git checkout test-netops-docs-workflow #$REF_HEAD
git checkout -b $DOWNSTREAM_FEATURE_BRANCH
git status
git add docs
COMMIT_MESSAGE="$PR_TITLE_PREFIX $COMMIT_SUFFIX"
git commit -m "$COMMIT_MESSAGE"

git push -u origin $DOWNSTREAM_FEATURE_BRANCH
Expand Down
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,25 @@ GOBIN=$(shell go env GOBIN)
endif
export PATH:=$(GOBIN):${PATH}

# TODO: Add another condition for PR Tag/PR/Branch
PR_BRANCH ?=
BRANCH ?= master
TAG ?=
# Then using TAG, the tar file starts with v, but the extracted dir does not
SRC := $(shell echo $(if $(TAG),$(TAG),$(BRANCH)) | sed 's/^v//')
ifdef PR_NUMBER
SRC = refs-pull-$(PR_NUMBER)-head
BRANCH = $(PR_BRANCH)
else
SRC = $(shell echo $(if $(TAG),$(TAG),$(BRANCH)) | sed 's/^v//')
endif

# Network Operator source tar location
REPO_TAR_URL ?= https://github.com/Mellanox/network-operator/archive/refs/$(if $(TAG),tags/$(TAG),heads/$(BRANCH)).tar.gz
#REPO_TAR_URL ?= https://github.com/Mellanox/network-operator/archive/refs/$(if $(TAG),tags/$(TAG),heads/$(BRANCH)).tar.gz
REPO_TAR_URL = https://github.com/heyvister1/network-operator/archive/refs/$(if $(TAG),tags/$(TAG),pull/$(PR_NUMBER))/head.tar.gz
#REPO_TAR_URL = github.com/heyvister1/network-operator/archive/refs/pull/2/head.tar.gz
# release.yaml location
RELEASE_YAML_URL ?= https://raw.githubusercontent.com/Mellanox/network-operator/$(if $(TAG),$(TAG),$(BRANCH))/hack/release.yaml
#RELEASE_YAML_URL ?= https://raw.githubusercontent.com/Mellanox/network-operator/$(if $(TAG),$(TAG),$(BRANCH))/hack/release.yaml
RELEASE_YAML_URL = https://raw.githubusercontent.com/heyvister1/network-operator/$(if $(TAG),$(TAG),$(BRANCH))/hack/release.yaml

# Path to download the crd api to.
CRD_API_DEP_ROOT = $(BUILDDIR)/crd
Expand Down
12 changes: 6 additions & 6 deletions docs/common/vars.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. |network-operator-version| replace:: v24.10.0-beta.5
.. |helm-chart-version| replace:: 24.10.0-beta.5
.. |network-operator-version| replace:: v24.10.0-rc.1
.. |helm-chart-version| replace:: 24.10.0-rc.1
.. |ocp-channel| replace:: v24.10
.. |mofed-version| replace:: 24.10-0.6.2.0-0
.. |mofed-version| replace:: 24.10-0.7.0.0-0
.. |mofed-init-container-version| replace:: v0.0.2
.. |sriov-device-plugin-version| replace:: v3.7.0
.. |sriov-device-plugin-version| replace:: v3.8.0
.. |k8s-rdma-shared-dev-plugin-version| replace:: sha-4f3eb2224b8b5f97be3f17441ddee8d41753b7d5
.. |ib-kubernetes-version| replace:: v1.1.0
.. |cni-plugins-version| replace:: v1.5.0
Expand All @@ -12,10 +12,10 @@
.. |whereabouts-version| replace:: v0.7.0
.. |nvidia-ipam-version| replace:: v0.2.0
.. |nic-feature-discovery-version| replace:: v0.0.1
.. |sriovnetop-version| replace:: network-operator-24.10.0-beta.5
.. |sriovnetop-version| replace:: network-operator-24.10.0-rc.1
.. |sriovnetop-sriov-cni-version| replace:: v2.8.1
.. |sriovnetop-ib-sriov-cni-version| replace:: v1.1.1
.. |sriovnetop-sriov-device-plugin-version| replace:: v3.7.0
.. |sriovnetop-sriov-device-plugin-version| replace:: v3.8.0
.. |doca-telemetry-version| replace:: 1.16.5-doca2.6.0-host
.. |node-feature-discovery-version| replace:: v0.15.6

14 changes: 7 additions & 7 deletions docs/customizations/helm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ General Parameters
- An optional list of references to secrets to use for pulling any of the Network Operator images.
* - nfd.deployNodeFeatureRules
- bool
- `true`
- `false`
- Deploy Node Feature Rules to label the nodes with the discovered features.
* - nfd.enabled
- bool
Expand Down Expand Up @@ -289,7 +289,7 @@ SR-IOV Network Operator Helm chart customization options can be found `here <htt
-
* - sriov-network-operator.images.operator
- string
- `"nvcr.io/nvstaging/mellanox/sriov-network-operator:network-operator-24.10.0-beta.5"`
- `"nvcr.io/nvstaging/mellanox/sriov-network-operator:network-operator-24.10.0-rc.1"`
-
* - sriov-network-operator.images.ovsCni
- string
Expand All @@ -305,15 +305,15 @@ SR-IOV Network Operator Helm chart customization options can be found `here <htt
-
* - sriov-network-operator.images.sriovConfigDaemon
- string
- `"nvcr.io/nvstaging/mellanox/sriov-network-operator-config-daemon:network-operator-24.10.0-beta.5"`
- `"nvcr.io/nvstaging/mellanox/sriov-network-operator-config-daemon:network-operator-24.10.0-rc.1"`
-
* - sriov-network-operator.images.sriovDevicePlugin
- string
- `"ghcr.io/k8snetworkplumbingwg/sriov-network-device-plugin:v3.7.0"`
- `"ghcr.io/k8snetworkplumbingwg/sriov-network-device-plugin:v3.8.0"`
-
* - sriov-network-operator.images.webhook
- string
- `"nvcr.io/nvstaging/mellanox/sriov-network-operator-webhook:network-operator-24.10.0-beta.5"`
- `"nvcr.io/nvstaging/mellanox/sriov-network-operator-webhook:network-operator-24.10.0-rc.1"`
-
* - sriov-network-operator.operator.admissionControllers
- yaml
Expand Down Expand Up @@ -421,7 +421,7 @@ NIC Configuration Operator Helm chart customization options can be found `here <
-
* - nic-configuration-operator-chart.configDaemon.image.tag
- string
- `"v0.1.5"`
- `"v0.1.12"`
-
* - nic-configuration-operator-chart.operator.image.name
- string
Expand All @@ -433,7 +433,7 @@ NIC Configuration Operator Helm chart customization options can be found `here <
-
* - nic-configuration-operator-chart.operator.image.tag
- string
- `"v0.1.5"`
- `"v0.1.12"`
-

=======================
Expand Down