import:
  - turbonomic/minions:travis/secrets/.servicenow.yml@travis
  - turbonomic/minions:travis/config/cache.yml@staging
  - turbonomic/minions:travis/config/git.yml@staging
  - turbonomic/minions:travis/config/before_install/draft-pr.yml@staging
  - turbonomic/minions:travis/config/before_install/apt.yml@staging
  - turbonomic/minions:travis/config/before_install/run-pre-commit.yml@staging
  - turbonomic/minions:travis/config/before_install/detect-secrets.yml@staging

arch: amd64

language: python
python:
  - '3.10'

before_install:
  - env
  - openssl aes-256-cbc -K $encrypted_089569710ca8_key -iv $encrypted_089569710ca8_iv -in .travis/id_ed25519_travis_github_operations.enc -out id_ed25519_travis_github_operations -d
  - chmod 600 id_ed25519_travis_github_operations
  - eval "$(ssh-agent -s)"
  - ssh-add id_ed25519_travis_github_operations
  - git remote -v
  - PROJECT=$(basename ${TRAVIS_REPO_SLUG}) && git remote set-url origin git@github.ibm.com:turbonomic/${PROJECT}.git
  - git remote -v

install: skip

stages:
- name: deploy
  if: type = push
- name: pull-request-build
  if: type = pull_request
jobs:
  include:
  - stage: pull-request-build
    script:
    - echo "TODO add pull-request-build validation" && echo -e 'travis_fold:start:pythonTest\\r'
    - echo -e 'travis_fold:end:pythonTest\\r'
  - stage: deploy
    script:
    - echo "TODO add deploy validation" && echo -e 'travis_fold:start:pythonDeploy\\r'
    - echo -e 'travis_fold:end:pythonDeploy\\r'
