Skip to content
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
24 changes: 19 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ stages:
vmImage: ubuntu-latest

container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bookworm:latest
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-trixie:latest

steps:
- checkout: self
Expand All @@ -50,8 +50,13 @@ stages:
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
patterns: |
target/debs/bookworm/libyang*.deb
target/python-wheels/bookworm/sonic_yang_models*.whl
target/debs/trixie/libpcre3_*.deb
target/debs/trixie/libpcre16-3_*.deb
target/debs/trixie/libpcre32-3_*.deb
target/debs/trixie/libpcrecpp0v5_*.deb
target/debs/trixie/libpcre3-dev_*.deb
target/debs/trixie/libyang*.deb
target/python-wheels/trixie/sonic_yang_models*.whl
displayName: "Download sonic buildimage"

- script: |
Expand All @@ -63,12 +68,21 @@ stages:
sudo sed -ri 's/redis-server.sock/redis.sock/' /etc/redis/redis.conf
sudo service redis-server start

# LIBPCRE3 (not in Trixie repos, required by libyang 1.0.73)
sudo dpkg -i ../target/debs/trixie/libpcre3_*.deb \
../target/debs/trixie/libpcre16-3_*.deb \
../target/debs/trixie/libpcre32-3_*.deb \
../target/debs/trixie/libpcrecpp0v5_*.deb

# LIBPCRE3-DEV (required by libyang-dev)
sudo dpkg -i ../target/debs/trixie/libpcre3-dev_*.deb

# LIBYANG
sudo dpkg -i ../target/debs/bookworm/libyang*1.0.73*.deb
sudo dpkg -i ../target/debs/trixie/libyang*1.0.73*.deb
displayName: "Install dependency"

- script: |
sudo pip3 install ../target/python-wheels/bookworm/sonic_yang_models-1.0-py3-none-any.whl
sudo pip3 install ../target/python-wheels/trixie/sonic_yang_models*.whl
displayName: "Install sonic yangs"

- script: |
Expand Down
2 changes: 1 addition & 1 deletion cvl/cvl.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func loadSchemaFiles() CVLRetCode {
// Now parse each schema file
var module *yparser.YParserModule
if module, _ = yparser.ParseSchemaFile(modelFilePath); module == nil {
CVL_LOG(FATAL, fmt.Sprintf("Unable to parse schema file %s", modelFile))
CVL_LOG(FATAL, "Unable to parse schema file %s", modelFile)
return CVL_ERROR
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ require (
google.golang.org/protobuf v1.21.0 // indirect
)

go 1.21
go 1.24.4
Comment thread
amrutasali marked this conversation as resolved.
28 changes: 28 additions & 0 deletions patches/apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,34 @@ copy github.com/openconfig/goyang v0.0.0-20200309174518-a00bece872fc .

copy github.com/openconfig/gnmi v0.0.0-20200617225440-d2b4e6a45802 .

# Update vendor/modules.txt to include the copied packages
# This is needed for Go 1.24+ which validates modules.txt even for --mod=vendor
function update_modules_txt() {
local modules_file="${DEST_DIR}/modules.txt"

# Add gnmi module entries if not already present
if ! grep -q '^github.com/openconfig/gnmi/ctree$' "${modules_file}" 2>/dev/null; then
echo "" >> "${modules_file}"
echo "# github.com/openconfig/gnmi v0.0.0-20200617225440-d2b4e6a45802" >> "${modules_file}"
echo "## explicit" >> "${modules_file}"
echo "github.com/openconfig/gnmi/ctree" >> "${modules_file}"
echo "github.com/openconfig/gnmi/errlist" >> "${modules_file}"
echo "github.com/openconfig/gnmi/proto/gnmi" >> "${modules_file}"
fi

# Add ygot module entries if not already present
if ! grep -q '^github.com/openconfig/ygot/ygen$' "${modules_file}" 2>/dev/null; then
echo "" >> "${modules_file}"
echo "# github.com/openconfig/ygot v0.7.1" >> "${modules_file}"
echo "## explicit" >> "${modules_file}"
echo "github.com/openconfig/ygot/genutil" >> "${modules_file}"
echo "github.com/openconfig/ygot/generator" >> "${modules_file}"
echo "github.com/openconfig/ygot/ygen" >> "${modules_file}"
fi
}

update_modules_txt

# Apply patches

patch -d ${DEST_DIR}/github.com/openconfig/ygot -p1 < ${PATCH_DIR}/ygot/ygot.patch
Expand Down