Skip to content

Commit

Permalink
Merge branch 'master' into addcomment
Browse files Browse the repository at this point in the history
  • Loading branch information
danameme authored Sep 26, 2024
2 parents 9b8a414 + 4513c14 commit 034beee
Show file tree
Hide file tree
Showing 186 changed files with 22,530 additions and 2,090 deletions.
14 changes: 14 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Definition of code OWNERS for the openconfig/public repository.
#
# default approvers:
* @aashaikh @robshakir @dplore

# the release/models directory (all YANG content)
# and doc directory is maintained by the public-writers
# OpenConfig team.
/doc @openconfig/public-writers
/release/models/ @openconfig/public-writers

# subfolders may have additional codeowners who
# may merge content
/release/models/wifi @mike-albano
23 changes: 23 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[Note: Please fill out the following template for your pull request. lines
tagged with "Note" can be removed from the template.]

[Note: Before this PR can be reviewed please agree to the CLA covering this
repo. Please also review the contribution guide -
https://github.com/openconfig/public/blob/master/doc/external-contributions-guide.md]

### Change Scope

* [Please briefly describe the change that is being made to the models.]
* [Please indicate whether this change is backwards compatible.]
### Platform Implementations

* Implementation A: [link to documentation](http://foo.com) and/or
implementation output.
* Implementation B: [link to documentation](http://foo.com) and/or
implementation output.

[Note: Please provide at least two references to implementations which are relevant to the model changes proposed. Each implementation should be from separate organizations.].

[Note: If the feature being proposed is new - and something that is being
proposed as an enhancement to device functionality, it is sufficient to have
reviewers from the producers of two different implementations].
42 changes: 42 additions & 0 deletions .github/workflows/diff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Breaking Changes

on:
pull_request:
branches: [ master ]

jobs:
build:
name: major version update check
runs-on: ubuntu-latest

steps:
- name: Install go
uses: actions/setup-go@v4
with:
go-version: '1.x'

- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install openconfig-ci CLI
run: |
go install github.com/openconfig/models-ci/openconfig-ci@05dd074
- name: Make sure all backward-incompatible changes are covered by version changes.
id: check
run: |
readonly HEAD=${{ github.event.pull_request.head.sha }}
readonly BASE="$(git merge-base origin/master "${HEAD}")"
BASEREPODIR=public_base
mkdir -p "${BASEREPODIR}/release"
git checkout "${BASE}"
cp -r release/models "${BASEREPODIR}/release"
cp -r third_party "${BASEREPODIR}"
git checkout "${HEAD}"
oldroot="${BASEREPODIR}"
newroot=.
openconfig-ci diff --disallowed-incompats --oldp "${oldroot}/third_party" --oldroot "${oldroot}/release/models" --newp "${newroot}/third_party" --newroot "${newroot}/release/models"
14 changes: 14 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '42 2 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days.'
days-before-stale: 180
days-before-close: 14
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Contributing to OpenConfig

Please see the [contributions
guide](https://github.com/openconfig/public/blob/master/doc/contributions-guide.md).
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![OpenConfig Linter](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:oc-pyang.svg)](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:oc-pyang.html)
[![pyangbind](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:pyangbind.svg)](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:pyangbind.html)
[![goyang/ygot](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:goyang-ygot.svg)](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:goyang-ygot.html)
[![ygnmi](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:ygnmi.svg)](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:ygnmi.html)
[![yanglint](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:yanglint.svg)](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:yanglint.html)

# OpenConfig
Expand All @@ -19,7 +20,7 @@ This repository is primarily for publishing the models, documents, and other
material developed by the OpenConfig operators group.

For information about how to contribute to OpenConfig models, please
see [External Submissions to OpenConfig](doc/external-contributions-guide.md).
see [External Submissions to OpenConfig](doc/contributions-guide.md).

Feedback and suggestions to improve OpenConfig models is welcomed on the
[public mailing list](https://groups.google.com/forum/?hl=en#!forum/netopenconfig),
Expand Down
80 changes: 47 additions & 33 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
substitutions:
_OC_PYANG_VERSION: master

steps:
############### GET CI REPO ###############
# Decrypt the file containing the key
Expand All @@ -15,6 +18,7 @@ steps:
- name: 'ssh'
path: /root/.ssh
# Set up git with key and domain
# See https://cloud.google.com/build/docs/access-github-from-build#add_the_public_ssh_key_to_known_hosts
- name: 'gcr.io/cloud-builders/git'
entrypoint: 'bash'
args:
Expand All @@ -32,23 +36,23 @@ steps:

############### COMMON PREP ###############
# Create GOPATH
- name: 'gcr.io/cloud-builders/go:debian'
- name: 'golang'
entrypoint: 'bash'
args: ['-c', 'mkdir -p /go/src/github.com/openconfig']
volumes:
- name: 'gopath'
path: /go
id: 'go path creation'
# Clone CI repository
- name: 'gcr.io/cloud-builders/go:debian'
- name: 'golang'
entrypoint: 'bash'
args:
- '-c'
- |
git clone [email protected]:openconfig/models-ci.git /go/src/github.com/openconfig/models-ci
cd /go/src/github.com/openconfig/models-ci
# Modify the major version to update models-ci version.
branch=$(git tag -l 'v6*' | sort -V | tail -1)
branch=$(git tag -l 'v13.*' | sort -V | tail -1)
git checkout $branch
volumes:
- name: 'ssh'
Expand All @@ -57,11 +61,11 @@ steps:
path: /go
id: 'models-ci clone'
# Get CI script dependencies
- name: 'gcr.io/cloud-builders/go:debian'
args:
- 'get'
- './cmd_gen'
- './post_results'
- name: 'golang'
entrypoint: 'go'
args:
- 'install'
- './...'
volumes:
- name: 'ssh'
path: /root/.ssh
Expand All @@ -72,7 +76,7 @@ steps:
dir: '/go/src/github.com/openconfig/models-ci'
id: 'models-ci dep'
# Generate validator scripts
- name: 'gcr.io/cloud-builders/go:debian'
- name: 'golang'
entrypoint: 'bash'
args:
- -c
Expand All @@ -83,9 +87,8 @@ steps:
-pr-head-repo-url=$_HEAD_REPO_URL
-commit-sha=$COMMIT_SHA
-pr-number=$_PR_NUMBER
-skipped-validators=confd
-skipped-validators=confd,yanglint
-extra-pyang-versions=2.2.1
-compat-report=yanglint
-branch=$BRANCH_NAME
secretEnv: ['GITHUB_ACCESS_TOKEN']
env:
Expand All @@ -97,7 +100,7 @@ steps:

############### REGEXP TESTS ###############
# Clone CI repository
- name: 'gcr.io/cloud-builders/go:debian'
- name: 'golang'
entrypoint: 'bash'
args:
- '-c'
Expand All @@ -115,8 +118,9 @@ steps:
waitFor: ['validator prep']
id: 'regexp clone'
# Get regexp dependencies
- name: 'gcr.io/cloud-builders/go:debian'
args: ['get', './...']
- name: 'golang'
entrypoint: 'go'
args: ['install', './...']
volumes:
- name: 'gopath'
path: /go
Expand All @@ -125,7 +129,7 @@ steps:
dir: '/go/src/github.com/openconfig/pattern-regex-tests'
waitFor: ['regexp clone']
id: 'regexp dep'
- name: 'gcr.io/$PROJECT_ID/models-ci-image'
- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image'
entrypoint: 'bash'
args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/regexp/test.sh"]
secretEnv: ['GITHUB_ACCESS_TOKEN']
Expand All @@ -151,7 +155,7 @@ steps:
args: ['cp', 'gs://openconfig/yanglint.deb', '/workspace/yanglint.deb']
waitFor: ['validator prep']
id: 'yanglint prep2'
- name: 'gcr.io/$PROJECT_ID/models-ci-image'
- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image'
entrypoint: 'bash'
args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/yanglint/test.sh"]
secretEnv: ['GITHUB_ACCESS_TOKEN']
Expand All @@ -169,7 +173,7 @@ steps:
id: 'yanglint'

############### MISC-CHECKS ###############
- name: 'gcr.io/cloud-builders/go:debian'
- name: 'golang'
entrypoint: 'bash'
args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/misc-checks/test.sh"]
secretEnv: ['GITHUB_ACCESS_TOKEN']
Expand All @@ -189,7 +193,7 @@ steps:
id: 'misc-checks'

############### OC-PYANG ###############
- name: 'gcr.io/$PROJECT_ID/models-ci-image'
- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image'
entrypoint: 'bash'
args: ['-c', '/go/src/github.com/openconfig/models-ci/validators/oc-pyang/test.sh']
secretEnv: ['GITHUB_ACCESS_TOKEN']
Expand All @@ -200,24 +204,15 @@ steps:
- 'COMMIT_SHA=$COMMIT_SHA'
- '_REPO_SLUG=$_REPO_SLUG'
- 'BRANCH_NAME=$BRANCH_NAME'
- '_OC_PYANG_VERSION=$_OC_PYANG_VERSION'
volumes:
- name: 'gopath'
path: /go
waitFor: ['validator prep']
id: 'oc-pyang'

############### GOYANG/YGOT ###############
- name: 'gcr.io/cloud-builders/go:debian'
args: ['get', 'github.com/openconfig/ygot/generator']
volumes:
- name: 'gopath'
path: /go
env:
- 'GOPATH=/go'
- 'GO111MODULE=on'
waitFor: ['go path creation']
id: 'goyang-ygot prep'
- name: 'gcr.io/$PROJECT_ID/models-ci-image'
- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image'
entrypoint: 'bash'
args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/goyang-ygot/test.sh"]
secretEnv: ['GITHUB_ACCESS_TOKEN']
Expand All @@ -231,11 +226,11 @@ steps:
- 'COMMIT_SHA=$COMMIT_SHA'
- '_REPO_SLUG=$_REPO_SLUG'
- 'BRANCH_NAME=$BRANCH_NAME'
waitFor: ['validator prep', 'goyang-ygot prep', 'oc-pyang']
waitFor: ['validator prep', 'go path creation', 'oc-pyang']
id: 'goyang-ygot'

############### PYANG ###############
- name: 'gcr.io/$PROJECT_ID/models-ci-image'
- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image'
entrypoint: 'bash'
args: ['-c', '/go/src/github.com/openconfig/models-ci/validators/pyang/test.sh']
secretEnv: ['GITHUB_ACCESS_TOKEN']
Expand All @@ -253,7 +248,7 @@ steps:
id: 'pyang'

############### PYANGBIND ###############
- name: 'gcr.io/$PROJECT_ID/models-ci-image'
- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image'
entrypoint: 'bash'
args: ['-c', '/go/src/github.com/openconfig/models-ci/validators/pyangbind/test.sh']
secretEnv: ['GITHUB_ACCESS_TOKEN']
Expand All @@ -270,8 +265,26 @@ steps:
waitFor: ['validator prep', 'oc-pyang']
id: 'pyangbind'

############### YGNMI ###############
- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image'
entrypoint: 'bash'
args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/ygnmi/test.sh"]
secretEnv: ['GITHUB_ACCESS_TOKEN']
volumes:
- name: 'gopath'
path: /go
env:
- 'GOPATH=/go'
- '_PR_NUMBER=$_PR_NUMBER'
- '_MODEL_ROOT=$_MODEL_ROOT'
- 'COMMIT_SHA=$COMMIT_SHA'
- '_REPO_SLUG=$_REPO_SLUG'
- 'BRANCH_NAME=$BRANCH_NAME'
waitFor: ['validator prep', 'go path creation', 'oc-pyang', 'pyangbind'] # wait for pyangbind to avoid possible OOM.
id: 'ygnmi'

############### COMPATIBILITY REPORT ###############
- name: 'gcr.io/$PROJECT_ID/models-ci-image'
- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image'
entrypoint: 'bash'
args: ['-c', '/go/src/github.com/openconfig/models-ci/validators/compat_report.sh']
secretEnv: ['GITHUB_ACCESS_TOKEN']
Expand All @@ -290,6 +303,7 @@ steps:
timeout: 600s
options:
machineType: 'E2_HIGHCPU_32'
logging: CLOUD_LOGGING_ONLY

availableSecrets:
inline:
Expand Down
Loading

0 comments on commit 034beee

Please sign in to comment.