forked from microsoft/delta-kusto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrev-pipeline.yaml
48 lines (46 loc) · 2.2 KB
/
rev-pipeline.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# YAML doc: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema
resources:
- repo: self
# Triggers: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema#triggers
trigger: none
# Stages: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema#stage
stages:
- stage: rev_engineer
displayName: Reverse Engineer Database
variables: []
jobs:
- job: delta_kusto
pool:
vmImage: 'ubuntu-latest'
variables: []
steps:
# Bash script: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema#bash
- bash: |
# Fails if one of the command fails in the script
set -e
clientVersion=$(curl https://delta-kusto.azurefd.net/clientVersion/unique?fromClientVersion=0)
# Display the version on console
echo "Client Version: $clientVersion"
wget https://github.com/microsoft/delta-kusto/releases/download/$clientVersion/delta-kusto-linux.tar.gz
tar --extract --file delta-kusto-linux.tar.gz
chmod +x ./delta-kusto
displayName: Install Delta-Kusto
- bash: |
# Fails if one of the command fails in the script
set -e
mkdir documentation/tutorials/az-dev-ops/reverse-engineer/kql-scripts
mkdir documentation/tutorials/az-dev-ops/reverse-engineer/kql-scripts/complete
displayName: Prep script folder
- bash: |
# Fails if one of the command fails in the script
set -e
clusterUri=$(CLUSTER_URI)
echo "Cluster URI: $clusterUri"
# Package the login in a JSON payload
login='{"tenantId":"$(TENANT_ID)","clientId":"$(CLIENT_ID)","secret":"$(SECRET)"}'
./delta-kusto -p documentation/tutorials/az-dev-ops/reverse-engineer/rev-engineer-parameters.yaml -o jobs.download-dev.target.adx.clusterUri=$clusterUri jobs.delta-dev.target.adx.clusterUri=$clusterUri tokenProvider.login=$login
displayName: Run Delta-Kusto
# Publish artefact: https://docs.microsoft.com/en-us/azure/devops/pipelines/artifacts/pipeline-artifacts#publish-artifacts
- publish: documentation/tutorials/az-dev-ops/reverse-engineer/kql-scripts
artifact: kql-scripts
displayName: 'Publish Artifact: kql-scripts'