-
Notifications
You must be signed in to change notification settings - Fork 3k
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
{C} Use Azure Artifacts feeds in release branch #29866
Changes from 16 commits
9530c8f
bf34a9b
1c5b9d0
2391f5e
8930bba
b80bb6b
dc7390c
95a88e6
62602bd
892cf44
4e10196
491f7fe
d6214cc
34aaaa1
39d6240
31fa29f
2c9ba0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ trigger: | |
branches: | ||
include: | ||
- '*' | ||
exclude: | ||
- 'release' | ||
|
||
pr: | ||
branches: | ||
|
@@ -205,6 +207,11 @@ jobs: | |
TargetPath: '$(Build.ArtifactStagingDirectory)/metadata' | ||
artifactName: metadata | ||
|
||
- task: PipAuthenticate@1 | ||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release') | ||
displayName: 'Pip Authenticate' | ||
inputs: | ||
artifactFeeds: ${{ variables.AZURE_ARTIFACTS_FEEDS }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Other tasks use macro syntax as My understanding is that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right, the variable defined in ADO UI is empty when use |
||
|
||
- script: | | ||
set ARCH=$(Platform) | ||
|
@@ -244,6 +251,11 @@ jobs: | |
TargetPath: '$(Build.ArtifactStagingDirectory)/metadata' | ||
artifactName: metadata | ||
|
||
- task: PipAuthenticate@1 | ||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release') | ||
displayName: 'Pip Authenticate' | ||
inputs: | ||
artifactFeeds: ${{ variables.AZURE_ARTIFACTS_FEEDS }} | ||
|
||
- script: | | ||
set ARCH=$(Platform) | ||
|
@@ -429,6 +441,11 @@ jobs: | |
inputs: | ||
versionSpec: 3.11 | ||
|
||
- task: PipAuthenticate@1 | ||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release') | ||
displayName: 'Pip Authenticate' | ||
inputs: | ||
artifactFeeds: ${{ variables.AZURE_ARTIFACTS_FEEDS }} | ||
|
||
- script: | | ||
if [[ "$(Build.Reason)" == "PullRequest" ]]; then | ||
|
@@ -719,6 +736,12 @@ jobs: | |
- bash: ./scripts/ci/install_docker.sh | ||
displayName: Install Docker | ||
|
||
- task: PipAuthenticate@1 | ||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release') | ||
displayName: 'Pip Authenticate' | ||
inputs: | ||
artifactFeeds: ${{ variables.AZURE_ARTIFACTS_FEEDS }} | ||
|
||
- task: Bash@3 | ||
displayName: 'Build Rpm Package: Azure Linux' | ||
inputs: | ||
|
@@ -809,6 +832,11 @@ jobs: | |
steps: | ||
- bash: ./scripts/ci/install_docker.sh | ||
displayName: Install Docker | ||
- task: PipAuthenticate@1 | ||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release') | ||
displayName: 'Pip Authenticate' | ||
inputs: | ||
artifactFeeds: ${{ variables.AZURE_ARTIFACTS_FEEDS }} | ||
- task: Bash@3 | ||
displayName: 'Build Rpm Package' | ||
inputs: | ||
|
@@ -926,6 +954,11 @@ jobs: | |
steps: | ||
- bash: ./scripts/ci/install_docker.sh | ||
displayName: Install Docker | ||
- task: PipAuthenticate@1 | ||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release') | ||
displayName: 'Pip Authenticate' | ||
inputs: | ||
artifactFeeds: ${{ variables.AZURE_ARTIFACTS_FEEDS }} | ||
- task: Bash@3 | ||
displayName: 'Build $(deb_system) $(distro) $(arch) Package' | ||
inputs: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,15 @@ set -exv | |
|
||
CLI_VERSION=`cat src/azure-cli/azure/cli/__main__.py | grep __version__ | sed s/' '//g | sed s/'__version__='// | sed s/\"//g` | ||
|
||
# PIP_INDEX_URL env must exist in `docker build --secret`, use an empty string if it doesn't exist. | ||
export PIP_INDEX_URL=${PIP_INDEX_URL} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Error message without empty env during |
||
|
||
# Create a container image that includes the source code and a built RPM using this file. | ||
docker build \ | ||
--target build-env \ | ||
--build-arg cli_version=${CLI_VERSION} \ | ||
--build-arg image=${IMAGE} \ | ||
--secret id=PIP_INDEX_URL \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is interesting that https://docs.docker.com/build/building/secrets/#sources
|
||
-f ./scripts/release/rpm/azurelinux.dockerfile \ | ||
-t azure/azure-cli:azurelinux-builder \ | ||
. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The public pipeline does not have the permission to run
PipAuthenticate@1
task, so skip it. This also saves some resource during CLI release.