pipelines-it-kubeflow.yml 1.9 KB
Newer Older
1
2
jobs:
- job: 'integration_test_kubeflow'
3
  timeoutInMinutes: 0
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
49
50
51
52
53
  pool: 'NNI CI KUBE CLI'

  variables:
    new_docker_img: msranni/nni.it.kb:latest

  steps:
  - script: python3 -m pip install --upgrade pip setuptools --user
    displayName: 'Install python tools'

  - script: |
      cd deployment/pypi
      echo 'building prerelease package...'
      make build
      ls $(Build.SourcesDirectory)/deployment/pypi/dist/
    condition: eq( variables['build_docker_img'], 'true' )
    displayName: 'build nni bdsit_wheel'

  - script: |
      cd deployment/pypi
      docker login -u $(docker_hub_user) -p $(docker_hub_pwd)

      echo 'updating docker file for installing nni from local...'
      # update Dockerfile to install NNI in docker image from whl file built in last step
      sed -ie 's/RUN python3 -m pip --no-cache-dir install nni/COPY .\/dist\/* .\nRUN python3 -m pip install nni-*.whl/' ../docker/Dockerfile
      cat ../docker/Dockerfile
      echo $IMG_TAG
      docker build -f ../docker/Dockerfile -t $(new_docker_img) .
      docker push $(new_docker_img)
    condition: eq( variables['build_docker_img'], 'true' )
    displayName: 'build and upload nni docker image'

  - script: |
      source install.sh
    displayName: 'Install nni toolkit via source code'

  - script: |
      if [ $(build_docker_img) = 'true' ]
      then
        export TEST_IMG=$(new_docker_img)
      else
        export TEST_IMG=$(existing_docker_img)
      fi
      echo "TEST_IMG:$TEST_IMG"
      cd test
      python3 generate_ts_config.py --ts kubeflow --keyvault_vaultname $(keyVault_vaultName) --keyvault_name $(keyVault_name) \
      --azs_account $(azureStorage_accountName) --azs_share $(azureStorage_azureShare) --nni_docker_image $TEST_IMG --nni_manager_ip $(nni_manager_ip)

      cat training_service.yml
      PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts kubeflow --exclude multi_phase
    displayName: 'integration test'