Forum Discussion

Izzy1330's avatar
Izzy1330
Copper Contributor
Jul 25, 2022

Using sshEnpoint Service connection and ARM Service connection in a single deploy template yml file

I am trying to combine 2 deploy yaml templates into single deploy template. one of the deploy template is using sshEndpoint serviceconnection sshEndpoint: '${{ parameters.serviceconnection }}' and other deploy template is using ARM serviceconnection azureSubscription: '${{ parameters.serviceconnection }}'. When I combine these 2 deploy templates and run the pipeline then I am getting below error -
*"The pipeline is not valid. Job adls_deployment: Step SSH1 input sshEndpoint expects a service connection of type ssh but the provided service connection is of type azurerm. Job adls_deployment: Step CopyFilesOverSSH1 input sshEndpoint expects a service connection of type ssh but the provided service connection is of type azurerm.*"

Combined deploy template provided below -

 

jobs:
- deployment: deploy_files
.
.
.
.


# Copy files over SSH
- task: CopyFilesOverSSH@0
inputs:
sshEndpoint: '${{ parameters.serviceconnection }}'
sourceFolder: '$(build.ArtifactStagingDirectory)/c.../'
contents: |
comm***
displayName: 'Copy common over SSH'

- task: CopyFilesOverSSH@0
inputs:
sshEndpoint: '${{ parameters.serviceconnection }}'
sourceFolder: '$(build.ArtifactStagingDirectory)/cc....'
contents: '**'
displayName: 'Copy files over SSH'

- task: CopyFilesOverSSH@0
inputs:
sshEndpoint: '${{ parameters.serviceconnection }}'
sourceFolder: '$(build.ArtifactStagingDirectory)/ccp....'
contents: '**'
displayName: 'Update the file permission'


##Copy Files to ADLS
- task: AzureCLI@2
inputs:
azureSubscription: '${{ parameters.serviceconnection }}'
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
displayName: 'Azure CLI to copy files to Azure Blob storage'

- task: AzureCLI@2
inputs:
azureSubscription: '${{ parameters.serviceconnection }}'
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
Fil....
displayName: 'Delete files from Azure Blob storage'

Kindly help me to resolve this error when using sshendpoint service connection and ARM service connection in single deploy template yml file...

No RepliesBe the first to reply

Resources