Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/syslog_telemetry_shared' into re…
Browse files Browse the repository at this point in the history
…manava_events
  • Loading branch information
renukamanavalan committed Jul 5, 2022
2 parents 8a4c593 + 8c03eb5 commit 6f9255a
Show file tree
Hide file tree
Showing 1,094 changed files with 170,577 additions and 3,454 deletions.
7 changes: 7 additions & 0 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
BUILD_OPTIONS: ${{ parameters.buildOptions }}
DOCKER_DATA_ROOT_FOR_MULTIARCH: /data/march/docker
dbg_image: no
asan_image: no
swi_image: no
raw_image: no
docker_syncd_rpc_image: no
Expand All @@ -42,6 +43,7 @@ jobs:
- name: vs
variables:
dbg_image: yes
asan_image: yes

- name: barefoot
variables:
Expand Down Expand Up @@ -98,13 +100,18 @@ jobs:
platform_rpc: nephos

buildSteps:
- template: template-skipvstest.yml
- bash: |
set -ex
if [ $(GROUP_NAME) == vs ]; then
if [ $(dbg_image) == yes ]; then
make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-vs.img.gz
mv target/sonic-vs.img.gz target/sonic-vs-dbg.img.gz
fi
if [ $(asan_image) == yes ]; then
make $BUILD_OPTIONS ENABLE_ASAN=y target/docker-sonic-vs.gz
mv target/docker-sonic-vs.gz target/docker-sonic-vs-asan.gz
fi
make $BUILD_OPTIONS target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz
if [ $(Build.Reason) != 'PullRequest' ];then
gzip -kd target/sonic-vs.img.gz
Expand Down
11 changes: 9 additions & 2 deletions .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,23 @@ jobs:
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
displayName: 'Make configure'
postSteps:
- script: cp target -r $(Build.ArtifactStagingDirectory)/
- script: |
mkdir -p $(Build.ArtifactStagingDirectory)/target
mv target/* $(Build.ArtifactStagingDirectory)/target/
displayName: Copy Artifacts
condition: always()
- publish: $(Build.ArtifactStagingDirectory)
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
displayName: "Archive sonic image"
- publish: $(Build.ArtifactStagingDirectory)
condition: failed()
condition: or(failed(), canceled())
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)$(System.JobAttempt)'
displayName: "Archive failed sonic image"
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: trigger-publish-artifacts-build.yml
parameters:
artifactName: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
publishPrefix: '$(Build.DefinitionName)/$(Build.SourceBranchName)/$(GROUP_NAME)'
- ${{ parameters.postSteps }}
- template: cleanup.yml
jobGroups: ${{ parameters.jobGroups }}
Expand Down
5 changes: 4 additions & 1 deletion .azure-pipelines/run-test-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ parameters:
type: string
- name: ptf_name
type: string
- name: vmtype
type: string
default: 'ceos'
- name: section
type: string
default: ''
Expand Down Expand Up @@ -41,7 +44,7 @@ steps:
git reset --hard origin/master
sed -i s/use_own_value/${username}/ ansible/veos_vtb
echo aaa > ansible/password.txt
docker exec sonic-mgmt bash -c "pushd /data/sonic-mgmt/ansible;./testbed-cli.sh -d /data/sonic-vm -m $(inventory) -t $(testbed_file) -k ceos refresh-dut ${{ parameters.tbname }} password.txt" && sleep 180
docker exec sonic-mgmt bash -c "pushd /data/sonic-mgmt/ansible;./testbed-cli.sh -d /data/sonic-vm -m $(inventory) -t $(testbed_file) -k ${{ parameters.vmtype }} refresh-dut ${{ parameters.tbname }} password.txt" && sleep 180
displayName: "Setup testbed"

- script: |
Expand Down
91 changes: 52 additions & 39 deletions .azure-pipelines/template-commonlib.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,53 @@
jobs:
- job: Build
timeoutInMinutes: 120
pool: sonicbld
variables:
- template: template-variables.yml
steps:
- checkout: self
clean: true
submodules: recursive
- script: |
set -ex
branch=$(Build.SourceBranchName)
# DIST_MASTER is set in variable.
BRANCH=DIST_${branch^^}
bldenvs=${!BRANCH}
[ "$bldenvs" == "" ] && bldenvs="$(COMMON_LIB_BUILD_ENVS)"
for bldenv in $bldenvs
do
BLDENV=$bldenv make -f Makefile.work configure PLATFORM=vs ENABLE_DOCKER_BASE_PULL=y
done
set +x
echo "##vso[task.setvariable variable=bldenvs;]$bldenvs"
displayName: Make configure
- script: |
set -ex
for bldenv in $(bldenvs)
do
LIBNL3_VERSION_BASE=$(grep "LIBNL3_VERSION_BASE =" rules/libnl3.mk | awk '{print$3}')
LIBNL3_VERSION=$(grep "LIBNL3_VERSION =" rules/libnl3.mk | awk '{print$3}' | sed -e "s/(//" -e "s/)//" -e "s/\\$//" -e "s/LIBNL3_VERSION_BASE/$LIBNL3_VERSION_BASE/")
SONIC_BUILD_JOBS=$(nproc) BLDENV=$bldenv make -f Makefile.work target/debs/$bldenv/libnl-3-200_${LIBNL3_VERSION}_amd64.deb ENABLE_DOCKER_BASE_PULL=y
parameters:
- name: archs
type: object
default:
- amd64
- armhf
- arm64

LIBYANG_VERSION_BASE=$(grep "LIBYANG_VERSION_BASE =" rules/libyang.mk | awk '{print$3}')
LIBYANG_VERSION=$(grep "LIBYANG_VERSION =" rules/libyang.mk | awk '{print$3}' | sed -e "s/\\$//" -e "s/(//" -e "s/)//" -e "s/LIBYANG_VERSION_BASE/$LIBYANG_VERSION_BASE/")
SONIC_BUILD_JOBS=$(nproc) BLDENV=$bldenv make -f Makefile.work target/debs/$bldenv/libyang_${LIBYANG_VERSION}_amd64.deb
done
mv target $(Build.ArtifactStagingDirectory)
displayName: Make common lib packages
- publish: $(Build.ArtifactStagingDirectory)
artifact: common-lib
jobs:
- ${{ each arch in parameters.archs }}:
- job: Build_${{ arch }}
timeoutInMinutes: 120
${{ if eq(arch,'amd64') }}:
pool: sonicbld
${{ else }}:
pool: sonicbld-${{ arch }}
variables:
- template: template-variables.yml
steps:
- checkout: self
clean: true
submodules: recursive
- script: |
set -ex
branch=$(Build.SourceBranchName)
# replace all: '-' -> '_'
branch=${branch//-/_}
# replace all: 'a' -> 'A', DIST_MASTER is set in variable.
BRANCH=DIST_${branch^^}
# variable name is dynamic
bldenvs=${!BRANCH}
[ "$bldenvs" == "" ] && bldenvs="$(COMMON_LIB_BUILD_ENVS)"
for bldenv in $bldenvs
do
BLDENV=$bldenv make -f Makefile.work configure PLATFORM_ARCH=${{ arch }} PLATFORM=vs ENABLE_DOCKER_BASE_PULL=y
done
set +x
echo "##vso[task.setvariable variable=bldenvs;]$bldenvs"
displayName: Make configure
- script: |
set -ex
for bldenv in $(bldenvs)
do
SONIC_BUILD_JOBS=$(nproc) BLDENV=$bldenv make -f Makefile.work lib-packages ENABLE_DOCKER_BASE_PULL=y
done
mv target $(Build.ArtifactStagingDirectory)
displayName: Make common lib packages
- ${{ if eq(arch,'amd64') }}:
- publish: $(Build.ArtifactStagingDirectory)
artifact: common-lib
- ${{ else }}:
- publish: $(Build.ArtifactStagingDirectory)
artifact: common-lib.${{ arch }}
12 changes: 12 additions & 0 deletions .azure-pipelines/template-skipvstest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
steps:
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- script: |
set -ex
tar_branch=origin/$(System.PullRequest.TargetBranch)
git diff $tar_branch..HEAD --name-only | grep -v -f .azure-pipelines/vstest-exclude && exit 0
git diff $tar_branch..HEAD --name-only | grep -f .azure-pipelines/vstest-include && exit 0
set +x
echo "Skip vstest jobs"
echo "##vso[task.setvariable variable=SKIP_VSTEST;isOutput=true]YES"
name: SetVar
displayName: "Check if vstest is needed."
1 change: 1 addition & 0 deletions .azure-pipelines/template-variables.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
variables:
DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io'
COMMON_LIB_BUILD_ENVS: 'bullseye'
SONIC_SLAVE_DOCKER_DRIVER: 'overlay2'
62 changes: 62 additions & 0 deletions .azure-pipelines/trigger-publish-artifacts-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# The steps to trigger the pipeline to publish the artifacts

parameters:
- name: artifactName
type: string
default: ""
- name: publishPrefix
type: string
default: "$(Build.DefinitionName)/$(Build.SourceBranchName)"

steps:
- script: |
. functions.sh
sonic_version=$(sonic_get_version)
latest_tag=$(git describe --tags --abbrev=0)
docker_tags="$sonic_version $(Build.SourceBranchName)"
if [ "$(Build.SourceBranchName)" == "master" ]; then
docker_tags="$docker_tags latest"
fi
echo "##vso[task.setvariable variable=sonic_version]$sonic_version"
echo "##vso[task.setvariable variable=latest_tag]$latest_tag"
echo "##vso[task.setvariable variable=docker_tags]$docker_tags"
displayName: 'Set trigger build variables'
- task: TriggerBuild@4
inputs:
definitionIsInCurrentTeamProject: false
teamProject: internal
tfsServer: $(System.CollectionUri)
buildDefinition: 'publish-artifacts'
queueBuildForUserThatTriggeredBuild: true
ignoreSslCertificateErrors: false
useSameSourceVersion: false
useCustomSourceVersion: false
useSameBranch: false
waitForQueuedBuildsToFinish: false
storeInEnvironmentVariable: true
authenticationMethod: 'Personal Access Token'
password: '$(system.accesstoken)'
enableBuildInQueueCondition: false
dependentOnSuccessfulBuildCondition: false
dependentOnFailedBuildCondition: false
checkbuildsoncurrentbranch: false
failTaskIfConditionsAreNotFulfilled: false
buildParameters: ''
templateParameters: |
pipelineContext: {"buildId":"$(Build.BuildId)",
"pipelineId":"$(System.DefinitionId)",
"project": "$(System.TeamProject)",
"branchName":"$(Build.SourceBranchName)"},
artifactContext: {"artifactName":"${{ parameters.artifactName }}",
"artifactPatterns":"**/*.bin\n
**/*.swi\n
**/*.raw\n
**/*.img.gz\n
**/*-rpc.gz\n
**/python-saithrift*.deb"},
publishContext: {"publishPrefix":"${{ parameters.publishPrefix }}",
"keepArtifactName":false,
"dockerImagePatterns":"target/*-rpc.gz",
"dockerTags":"$(docker_tags)",
"version":"$(sonic_version)",
"latestTag":"$(latest_tag)"}
3 changes: 3 additions & 0 deletions .azure-pipelines/vstest-exclude
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
^platform
^.azure-pipelines
^files/build/versions
2 changes: 2 additions & 0 deletions .azure-pipelines/vstest-include
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
^platform/vs
^.azure-pipelines/run-test-template.yml
74 changes: 73 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
/Makefile.work @qiluo-msft @xumia @lguohan
/slave.mk @qiluo-msft @xumia @lguohan
/scripts @qiluo-msft @xumia @lguohan
/src/sonic-build-hooks/ @Azure/sonic-build
/src/debootstrap/ @Azure/sonic-build
/src/sonic-fips/ @Azure/sonic-build

# installer
/installer/ @qiluo-msft
Expand All @@ -31,8 +34,77 @@
/dockers/docker-config-engine*/ @qiluo-msft
/dockers/docker-snmp/ @qiluo-msft

# src
# kernel
/src/sonic-linux-kernel/ @Azure/sonic-kernel

# devices
/device/ @Azure/sonic-platform
/src/sonic-platform-common/ @Azure/sonic-platform
/src/sonic-platform-daemons/ @Azure/sonic-platform
/src/sonic-platform-pde/ @Azure/sonic-platform
/src/lm-sensors/ @Azure/sonic-platform
/src/flashrom/ @Azure/sonic-platform

# common library
/src/initramfs-tools/ @qiluo-msft
/src/redis-dump-load/ @Azure/sonic-management
/src/sonic-py-common/ @Azure/sonic-management
/src/sonic-py-swsssdk/ @Azure/sonic-management
/src/sonic-swss-common/ @Azure/sonic-management
/src/bash/ @Azure/sonic-management
/src/tacacs/ @Azure/sonic-management
/src/radius/ @Azure/sonic-management
/src/swig/ @Azure/sonic-management
/src/socat/ @Azure/sonic-management

# redis
/src/redis/ @Azure/sonic-management
/src/hiredis/ @Azure/sonic-management

# yang
/src/sonic-yang-models/ @praveen-li @dgsudharsan @rathnasabapathyv @venkatmahalingam @qiluo-msft
/src/sonic-yang-mgmt/ @Azure/sonic-management
/src/libyang/ @Azure/sonic-management
/src/libyang1/ @Azure/sonic-management
/src/libyang2/ @Azure/sonic-management

# bgpcfgd
/src/sonic-bgpcfgd/ @StormLiangMS

# sonic-config-engine
/src/sonic-config-engine/ @Azure/sonic-management

# sonic-utilities
/src/sonic-utilities/ @Azure/sonic-management

# sonic-telemetry
/src/sonic-telemetry/ @Azure/sonic-management

# snmp
/src/sonic-snmpagent/ @Azure/sonic-management
/src/snmpd/ @Azure/sonic-management

# dhcp relay
/src/dhcp6relay/ @Azure/sonic-fundamentals
/src/dhcpmon/ @Azure/sonic-fundamentals
/src/isc-dhcp/ @Azure/sonic-fundamentals

# sflow
/src/sflow/ @Azure/sonic-dataplane

# sonic restapi
/src/sonic-restapi/ @Azure/sonic-dataplane

# sonic swss
/src/sonic-swss/ @Azure/sonic-dataplane

# linux networking, e.g., libnl3, iproute2, ifupdown2, ethtool
/src/libnl3/ @Azure/sonic-dataplane
/src/iproute2/ @Azure/sonic-dataplane
/src/ifupdown2/ @Azure/sonic-dataplane
/src/ethtool/ @Azure/sonic-dataplane

# ptf
/src/ptf/ @Azure/sonic-fundamentals
/src/ptf-py3/ @Azure/sonic-fundamentals
/src/scapy/ @Azure/sonic-fundamentals
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205

#### Description for the changelog
<!--
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ target/
*.img
*.pyc

# Slave docker log files
sonic-slave*/*.log

# Autogenerated Dockerfiles
sonic-slave*/Dockerfile
sonic-slave*/Dockerfile.user
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
[submodule "src/sonic-frr/frr"]
path = src/sonic-frr/frr
url = https://github.com/Azure/sonic-frr.git
branch = frr/7.5
branch = frr/8.2
[submodule "platform/p4/p4-hlir/p4-hlir-v1.1"]
path = platform/p4/p4-hlir/p4-hlir-v1.1
url = https://github.com/p4lang/p4-hlir.git
Expand Down
6 changes: 6 additions & 0 deletions Makefile.cache
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,12 @@ define SHA_DEP_RULES
ALL_DEP_FILES_LIST += $(foreach pkg,$(2), $($(filter none,$($(1)_CACHE_MODE)), \
$(addsuffix .$(3),$(addprefix $(pkg)/, $(1))) \
$(addsuffix .$(3).sha,$(addprefix $(pkg)/, $(1)))))
$(foreach docker, $(filter $(SONIC_DOCKER_IMAGES), $(1)), \
$(eval $(docker)_DEP_FILES+=$(wildcard files/build/versions/default/*) \
$(wildcard files/build/versions/dockers/$(basename $(docker))/*)))
$(foreach docker, $(filter $(SONIC_DOCKER_DBG_IMAGES), $(1)), \
$(eval $(docker)_DEP_FILES+=$(wildcard files/build/versions/default/*) \
$(wildcard files/build/versions/dockers/$(patsubst %-$(DBG_IMAGE_MARK).gz,%,$(docker))/*)))
$(addsuffix .$(3),$(addprefix $(2)/, $(1))) : $(2)/%.$(3) : \
$(2)/%.flags $$$$($$$$*_DEP_FILES) $$$$(if $$$$($$$$*_SMDEP_FILES), $(2)/%.smdep)
@$$(eval $$*_DEP_FILES_MODIFIED := $$? )
Expand Down
Loading

0 comments on commit 6f9255a

Please sign in to comment.