-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dev-password-hardening-yang-model
- Loading branch information
Showing
460 changed files
with
31,634 additions
and
4,522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
parameters: | ||
- name: connectionName | ||
type: string | ||
default: sonic-dev-connection | ||
- name: kevaultName | ||
type: string | ||
default: sonic-kv | ||
- name: certificateName | ||
type: string | ||
default: sonic-secure-boot | ||
|
||
steps: | ||
- task: AzureKeyVault@2 | ||
inputs: | ||
connectedServiceName: ${{ parameters.connectionName }} | ||
keyVaultName: ${{ parameters.kevaultName }} | ||
secretsFilter: ${{ parameters.certificateName }} | ||
|
||
- script: | | ||
set -e | ||
TMP_FILE=$(mktemp) | ||
echo "$CERTIFICATE" | base64 -d > $TMP_FILE | ||
sudo mkdir -p /etc/certificates | ||
mkdir -p $(Build.StagingDirectory)/target | ||
# Save the public key | ||
openssl pkcs12 -in $TMP_FILE -clcerts --nokeys -nodes -passin pass: | sed -z -e "s/.*\(-----BEGIN CERTIFICATE\)/\1/" > $(SIGNING_CERT) | ||
# Save the private key | ||
openssl pkcs12 -in $TMP_FILE -nocerts -nodes -passin pass: | sed -z -e "s/.*\(-----BEGIN PRIVATE KEY\)/\1/" | sudo tee $(SIGNING_KEY) 1>/dev/null | ||
ls -lt $(SIGNING_CERT) $(SIGNING_KEY) | ||
rm $TMP_FILE | ||
env: | ||
CERTIFICATE: $(${{ parameters.certificateName }}) | ||
displayName: "Save certificate" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
pr: none | ||
trigger: none | ||
schedules: | ||
- cron: "0 0 * * *" | ||
displayName: Daily build | ||
branches: | ||
include: | ||
- master | ||
- 202??? | ||
resources: | ||
repositories: | ||
- repository: buildimage | ||
type: github | ||
name: Azure/sonic-buildimage | ||
ref: master | ||
endpoint: build | ||
|
||
jobs: | ||
- template: .azure-pipelines/template-commonlib.yml@buildimage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
steps: | ||
- script: | | ||
. functions.sh | ||
SONIC_VERSION=$(sonic_get_version) | ||
echo "SONIC_VERSION=$SONIC_VERSION" | ||
if [[ "$SONIC_VERSION" == *dirty* ]]; then | ||
# Print the detail dirty info | ||
git status --untracked-files=no -s --ignore-submodules | ||
# Exit with error, if it is a PR build | ||
if [ "$(Build.Reason)" == "PullRequest" ]; then | ||
echo "Build failed for the dirty version: $SONIC_VERSION" 1>&2 | ||
exit 1 | ||
fi | ||
fi | ||
displayName: "Check the dirty version" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
steps: | ||
- script: | | ||
containers=$(docker container ls -a | grep "sonic-slave" | awk '{ print $1 }') | ||
[ -n "$containers" ] && docker container rm -f containers | ||
set -x | ||
containers=$(docker container ls -aq) | ||
[ -n "$containers" ] && docker container rm -f $containers | ||
docker images | grep "^<none>" | awk '{print$3}' | xargs -i docker rmi {} | ||
images=$(docker images 'sonic-slave-*' -a -q) | ||
[ -n "$images" ] && docker rmi -f $images | ||
exit 0 | ||
displayName: 'Cleanup sonic slave' |
Oops, something went wrong.