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

[ci]: Add yaml for azure pipeline official build #6588

Merged
merged 36 commits into from
Feb 5, 2021
Merged

[ci]: Add yaml for azure pipeline official build #6588

merged 36 commits into from
Feb 5, 2021

Conversation

liushilongbuaa
Copy link
Contributor

- Why I did it
To support nightly build for master branch
- How I did it

- How to verify it
confirm from azure pipeline page.
- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

azure-pipelines.yml Outdated Show resolved Hide resolved
azure-pipelines.yml Outdated Show resolved Hide resolved
@lguohan lguohan changed the title Add yaml for azure pipeline [ci]: Add yaml for azure pipeline official build Jan 29, 2021
Copy link
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change to .azure-pipelines/official.yml

@liushilongbuaa liushilongbuaa requested a review from a team as a code owner February 1, 2021 08:22
@jleveque jleveque added the ci label Feb 1, 2021
@liushilongbuaa
Copy link
Contributor Author

/AzurePipelines run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 6588 in repo Azure/sonic-buildimage

- script: |
sudo kill -9 `sudo cat /var/run/march/docker.pid` || true
sudo rm -f /var/run/march/docker.pid || true
sudo rm -rf sonic-buildimage || sudo rm -rf ../sonic-buildimage || true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code checked out as /agent/_work/1/s

there is no sonic-buildimage directory here.

should do sudo rm -rf target

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we publish $(system.DefaultWorkingDirectory)/target, instead of $(system.DefaultWorkingDirectory)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if $(system.DefaultWorkingDirectory)/fsroot exist, publish maybe failed.

Signed-off-by: shilongliu <shilongliu@microsoft.com>
Signed-off-by: shilongliu <shilongliu@microsoft.com>
Signed-off-by: shilongliu <shilongliu@microsoft.com>
Signed-off-by: shilongliu <shilongliu@microsoft.com>
liushilongbuaa and others added 17 commits February 4, 2021 17:23
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
- checkout: self
submodules: recursive
displayName: 'Checkout code'
- script: |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add clean=true in checkout, so this block can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If fsroot exist, checkout with "clean=true" will fail because of permission.
Put clean steps together. Do cleaning job pre-build and post-build. This is more robust than build-in clean.

git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
displayName: 'reset submodules'
- script: |
Copy link
Collaborator

@xumia xumia Feb 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about to move the script from the template to the official.yml, only keep the most common part in the template, like init, checkout, publish, cleanup.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each plat form write their own script. this will make yml file more different with each other, like current Jenkinsfiles.

Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
@qiluo-msft qiluo-msft merged commit 23381e6 into sonic-net:master Feb 5, 2021
skytreat pushed a commit to skytreat/sonic-buildimage that referenced this pull request Feb 9, 2021
**- Why I did it**
To support nightly build for master branch

**- How to verify it**
confirm from azure pipeline page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants