Skip to content

Commit

Permalink
removing local enabled variables
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrandolph committed Mar 20, 2020
1 parent 7a1c5fb commit 044a8ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 30 deletions.
13 changes: 2 additions & 11 deletions azure/mobile/build-xamarin-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ parameters:
stages:
- stage: ${{ parameters.stage_name }}
dependsOn: ${{ parameters.depends_on }}
condition: eq( variables['build_enabled'],'true')
condition: eq( ${{ parameters.build_android_enabled }},'true')
variables:
- name: build_enabled
value: ${{ parameters.build_android_enabled }}
- name: ANDROID_NDK_HOME
value: C:\Microsoft\AndroidNDK64\android-ndk-r16b
- name: ANDROID_NDK_PATH
Expand All @@ -128,7 +126,6 @@ stages:
# specified in the parameter secure_file_keystore_filename
- task: DownloadSecureFile@1
displayName: 'Download secure file ${{ parameters.secure_file_keystore_filename }}'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
name: signing_keystore
inputs:
secureFile: '${{ parameters.secure_file_keystore_filename }}'
Expand All @@ -141,7 +138,6 @@ stages:
# whether the build output will be apk or aab
- task: PowerShell@2
displayName: 'Determine packaging format'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
targetType: 'inline'
script: |
Expand All @@ -165,7 +161,7 @@ stages:
# multiple android projects
- task: PowerShell@2
displayName: 'Determine the location of the AndroidManifest.xml file'
condition: and( eq( variables['manifestPath'], ''), eq( variables['build_enabled'],'true') )
condition: and( succeeded(), eq( variables['manifestPath'], '') )
inputs:
targetType: 'inline'
script: |
Expand All @@ -177,7 +173,6 @@ stages:
# Update the AndroidManifest.xml with the verion information
- task: android-manifest-version@1
displayName: 'Setting application version in $(manifestPath)'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
sourcePath: '$(manifestPath)'
versionCodeOption: 'buildid'
Expand All @@ -197,7 +192,6 @@ stages:
# Build the solution
- task: VSBuild@1
displayName: 'Building solution ${{ parameters.solution_filename }}'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
solution: '${{ parameters.solution_filename }}'
configuration: '${{ parameters.solution_build_configuration }}'
Expand All @@ -218,7 +212,6 @@ stages:
# have the same filename
- task: CopyFiles@2
displayName: 'Copying files to artifact folder ${{ parameters.artifact_folder }}'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
contents: '$(outputSearch)'
targetFolder: '$(build.artifactStagingDirectory)/${{ parameters.artifact_folder }}'
Expand All @@ -228,7 +221,6 @@ stages:
# Rename the application package to the name specified in the application_package parameter
- task: PowerShell@2
displayName: 'Rename application package'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
targetType: 'inline'
script: |
Expand All @@ -245,7 +237,6 @@ stages:
# Publish artifacts from this stage
- task: PublishBuildArtifacts@1
displayName: 'Publishing artifacts to ${{ parameters.artifact_name }}'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
pathtoPublish: '$(build.artifactStagingDirectory)'
artifactName: '${{ parameters.artifact_name }}'
Expand Down
16 changes: 3 additions & 13 deletions azure/mobile/build-xamarin-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ parameters:
stages:
- stage: ${{ parameters.stage_name }}
dependsOn: ${{ parameters.depends_on }}
condition: eq( variables['build_enabled'],'true')
condition: eq( ${{ parameters.build_windows_enabled }},'true')
variables:
- name: build_enabled
value: ${{ parameters.build_windows_enabled }}
- name: cert_thumbprint
value: ''
- name: cert_subject
Expand All @@ -133,7 +131,6 @@ stages:
# specified in the parameter windows_cert_securefiles_filename
- task: DownloadSecureFile@1
displayName: 'Download secure file ${{ parameters.windows_cert_securefiles_filename }}'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
name: signing_certificate
inputs:
secureFile: '${{ parameters.windows_cert_securefiles_filename }}'
Expand All @@ -147,7 +144,7 @@ stages:
# multiple windows projects
- task: PowerShell@2
displayName: 'Determine the location of the package.appxmanifest file'
condition: and( eq( variables['manifestPath'], ''), eq( variables['build_enabled'],'true') )
condition: and( succeeded(), eq( variables['manifestPath'], '') )
inputs:
targetType: 'inline'
script: |
Expand All @@ -161,7 +158,7 @@ stages:
# windows_upload_name parameter
- task: PowerShell@2
displayName: 'Determine upload file name'
condition: and( eq( variables['windows_upload_filename'], ''), eq( variables['build_enabled'],'true') )
condition: and( succeeded(), eq( variables['windows_upload_filename'], '') )
inputs:
targetType: 'inline'
script: |
Expand All @@ -175,7 +172,6 @@ stages:
# and subject of the certificate
- task: PowerShell@2
displayName: Extract certificate thumbnail and subject
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
targetType: 'inline'
script: |
Expand Down Expand Up @@ -204,7 +200,6 @@ stages:
# This task updates the version number and publisher in the package.manifest file
- task: MagicChunks@2
displayName: 'Updating manifest file with version number and publisher - $(manifestPath)'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
sourcePath: $(manifestPath)
fileType: Xml
Expand All @@ -228,7 +223,6 @@ stages:
# Build the solution
- task: VSBuild@1
displayName: 'Building solution ${{ parameters.solution_filename }}'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
solution: ${{ parameters.solution_filename }}
msbuildArgs: '/p:AppxBundlePlatforms="${{ parameters.uwpPackagePlatforms }}"
Expand All @@ -252,7 +246,6 @@ stages:
# have the same filename
- task: CopyFiles@2
displayName: 'Copying files to artifact folder ${{ parameters.artifact_folder }}'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
contents: '$(appxPackageDir)\**\*.*xbundle'
targetFolder: '$(build.artifactStagingDirectory)/${{ parameters.artifact_folder }}'
Expand All @@ -264,7 +257,6 @@ stages:
# have the same filename
- task: CopyFiles@2
displayName: 'Copying files to artifact folder ${{ parameters.artifact_folder }}'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
contents: '$(appxPackageDir)\**\*.*xupload'
targetFolder: '$(build.artifactStagingDirectory)/${{ parameters.artifact_folder }}'
Expand All @@ -274,7 +266,6 @@ stages:
# Rename the application package to the name specified in the application_package parameter
- task: PowerShell@2
displayName: 'Rename application package'
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
inputs:
targetType: 'inline'
script: |
Expand All @@ -286,7 +277,6 @@ stages:

# Publish artifacts from this stage
- task: PublishBuildArtifacts@1
condition: and( succeeded(), eq( variables['build_enabled'],'true') )
displayName: 'Publishing artifacts to ${{ parameters.artifact_name }}'
inputs:
pathtoPublish: '$(build.artifactStagingDirectory)'
Expand Down
8 changes: 2 additions & 6 deletions azure/mobile/deploy-appcenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,8 @@ parameters:
stages:
- stage: ${{ parameters.stage_name }}
dependsOn: ${{ parameters.depends_on }}
condition: eq( variables['deploy_enabled'],'true')
condition: eq( ${{ parameters.deploy_appcenter_enabled }} ,'true')
variables:
- name: deploy_enabled
value: ${{ parameters.deploy_appcenter_enabled }}
- name: application_fullpath
value: '$(Pipeline.Workspace)/${{ parameters.artifact_name }}/${{ parameters.artifact_folder }}/${{ parameters.application_package }}'
- name: release_notes_fullpath
Expand Down Expand Up @@ -167,7 +165,6 @@ stages:
# Download the artifacts
- task: DownloadBuildArtifacts@0
displayName: Download pipeline artifacts
condition: and( succeeded(), eq( variables['deploy_enabled'],'true') )
inputs:
buildType: 'current'
artifactName: ${{ parameters.artifact_name }}
Expand All @@ -178,7 +175,7 @@ stages:

- task: PowerShell@2
displayName: Use Bundletool to extract and sign APK
condition: and( and( succeeded(), eq( variables['deploy_enabled'],'true') ), contains( variables['application_fullpath'],'.aab') )
condition: and( succeeded(), contains( variables['application_fullpath'],'.aab') )
inputs:
targetType: 'inline'
script: |
Expand All @@ -202,7 +199,6 @@ stages:

- task: AppCenterDistribute@3
displayName: 'Deploy to Visual Studio App Center'
condition: and( succeeded(), eq( variables['deploy_enabled'],'true') )
inputs:
serverEndpoint: ${{ parameters.appcenter_service_connection }}
appSlug: '${{ parameters.appcenter_organisation }}/${{ parameters.appcenter_applicationid }}'
Expand Down

0 comments on commit 044a8ba

Please sign in to comment.