forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Build extension using a template * Update build template in run test
- Loading branch information
1 parent
3be9ccb
commit 0fbfcd5
Showing
3 changed files
with
70 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
parameters: | ||
CLI_REPO_PATH: "" | ||
steps: | ||
- bash: | | ||
echo "Using the private preview of k8s-extension to build..." | ||
cp ${{ parameters.CLI_REPO_PATH }}/src/k8s-extension ${{ parameters.CLI_REPO_PATH }}/src/k8s-extension-private -r | ||
mv ${{ parameters.CLI_REPO_PATH }}/src/k8s-extension-private/azext_k8s_extension ${{ parameters.CLI_REPO_PATH }}/src/k8s-extension-private/azext_k8s_extension_private | ||
cp ${{ parameters.CLI_REPO_PATH }}/src/k8s-extension-private/setup_private.py ${{ parameters.CLI_REPO_PATH }}/src/k8s-extension-private/setup.py | ||
cp ${{ parameters.CLI_REPO_PATH }}/src/k8s-extension-private/azext_k8s_extension_private/consts_private.py ${{ parameters.CLI_REPO_PATH }}/src/k8s-extension-private/azext_k8s_extension_private/consts.py | ||
EXTENSION_NAME="k8s-extension-private" | ||
EXTENSION_FILE_NAME="k8s_extension_private" | ||
echo "##vso[task.setvariable variable=EXTENSION_NAME]$EXTENSION_NAME" | ||
echo "##vso[task.setvariable variable=EXTENSION_FILE_NAME]$EXTENSION_FILE_NAME" | ||
condition: and(succeeded(), eq(variables['IS_PRIVATE_BRANCH'], 'True')) | ||
displayName: "Copy Files, Set Variables for k8s-extension-private" | ||
- bash: | | ||
echo "Using the public version of k8s-extension to build..." | ||
EXTENSION_NAME="k8s-extension" | ||
EXTENSION_FILE_NAME="k8s_extension" | ||
echo "##vso[task.setvariable variable=EXTENSION_NAME]$EXTENSION_NAME" | ||
echo "##vso[task.setvariable variable=EXTENSION_FILE_NAME]$EXTENSION_FILE_NAME" | ||
condition: and(succeeded(), eq(variables['IS_PRIVATE_BRANCH'], 'False')) | ||
displayName: "Copy Files, Set Variables for k8s-extension" | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python 3.6' | ||
inputs: | ||
versionSpec: 3.6 | ||
- bash: | | ||
set -ev | ||
echo "Building extension ${EXTENSION_NAME}..." | ||
# prepare and activate virtualenv | ||
pip install virtualenv | ||
python3 -m venv env/ | ||
source env/bin/activate | ||
# clone azure-cli | ||
git clone -q --single-branch -b dev https://github.com/Azure/azure-cli.git ../azure-cli | ||
pip install --upgrade pip | ||
pip install -q azdev | ||
ls ${{ parameters.CLI_REPO_PATH }} | ||
azdev --version | ||
azdev setup -c ../azure-cli -r ${{ parameters.CLI_REPO_PATH }} -e $(EXTENSION_NAME) | ||
azdev extension build $(EXTENSION_NAME) |
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