Does anyone have experience building their meltano...
# infra-deployment
a
Does anyone have experience building their meltano image in Azure Pipelines? I am struggling to get my private taps on Azure Devops installed in my
meltano install
step due to git permissions. I've tried adding a git ssh key, including the repos as resource definitions, using a Azure Repos service connection, nothing got me very far. Any pointers welcome.
v
here's how i do it in gitlab. it's really not gitlab specefic https://docs.gitlab.com/ee/ci/ssh_keys/
a
Thanks. I've had to fall back to using access token + https rather than ssh for now, but will take a look at the gitlab version. Also I keep forgetting to do things like
ARG
in my Dockerfile and keep expecting variables to be accessible to docker by magic... 😞
âž• 1
For anyone else interested here's what I ended up with
Copy code
variables:
  - ${{ if eq(variables['Build.SourceBranchName'], 'main') }}:
    - group: main
  - ${{ else }}:
    - group: dev

resources:
  repositories:
  - repository: tap-funky-custom-api
    type: git
    name: MyProject/tap-funky-custom-api
 


name: $(SourceBranchName)-$(Date:yyyyMMdd)-$(Rev:r)

trigger:
  branches:
    include:
    - main
    - dev

pool:
  vmImage: ubuntu-latest


stages:
- stage: 'Deploy'
  jobs:
  - job: 'DockerDeployment'
    uses:
        repositories: # List of referenced repositories
        - tap-funky-custom-api
    steps:
    - task: Docker@2
      env:
        ADO_TOKEN: $(System.AccessToken)
      inputs:
        command: 'build'
        containerRegistry: $(SERVICE_CONN)
        repository: $(REPOSITORY)
        Dockerfile: '**/Dockerfile'
        arguments: '--build-arg ado_token=$(System.AccessToken)'
        tags: latest
    - task: Docker@2
      inputs:
        command: 'push'
        containerRegistry: $(SERVICE_CONN)
        repository: $(REPOSITORY)
        tags: latest