<commit_before>version: 2.1
jobs:
  lint:
    docker:
      - image: circleci/golang:1.12
    working_directory: /go/src/github.com/ory/k8s
    steps:
      - checkout
      - run: curl -L https://git.io/get_helm.sh | bash
      - run: helm lint ./helm/charts/oathkeeper/
      - run: helm lint ./helm/charts/hydra/
      - run: helm lint ./helm/charts/hive/
      - run: helm lint ./helm/charts/example-idp/

  test:
    machine:
      image: ubuntu-1604:201903-01
      docker_layer_caching: true
    steps:
      - checkout
      - run:
          name: "Install microk8s & kubectl"
          command: |
            sudo apt-get update 
            sudo apt-get -y install snapd
            sudo snap install microk8s --classic
            sudo snap install kubectl --classic
            snap info microk8s
            sudo usermod -a -G microk8s circleci
      - run:
          name: "System setup"
          command: |
            echo 'export PATH=/snap/bin:$PATH' >> $BASH_ENV
            source $BASH_ENV
            sudo iptables -P FORWARD ACCEPT
      - run:
          name: "Start microk8s"
          command: |
            microk8s.start
            microk8s.status
            microk8s.enable dns
            kubectl get all --all-namespaces
      - run: 
          name: "Install Helm"
          command: |
            curl -L https://git.io/get_helm.sh | bash
            helm init --service-account default --wait
      - run: .circleci/helm-test.sh oathkeeper
      - run: .circleci/helm-test.sh hydra

  release:
    docker:
      - image: circleci/golang:1.12
    working_directory: /go/src/github.com/ory/k8s
    steps:
      - checkout
      - run: curl -L https://git.io/get_helm.sh | bash
      - run: helm init --client-only
      - run: helm package -d docs/helm/charts/ ./helm/charts/oathkeeper/ --version `echo $CIRCLE_TAG | sed s/v//g`
      - run: helm package -d docs/helm/charts/ ./helm/charts/hydra/ --version `echo $CIRCLE_TAG | sed s/v//g`<commit_msg>Resolve microk8s issues by downgrading to 1.13 (#61)<commit_after>version: 2.1
jobs:
  lint:
    docker:
      - image: circleci/golang:1.12
    working_directory: /go/src/github.com/ory/k8s
    steps:
      - checkout
      - run: curl -L https://git.io/get_helm.sh | bash
      - run: helm lint ./helm/charts/oathkeeper/
      - run: helm lint ./helm/charts/hydra/
      - run: helm lint ./helm/charts/hive/
      - run: helm lint ./helm/charts/example-idp/

  test:
    machine:
      image: ubuntu-1604:201903-01
      docker_layer_caching: true
    steps:
      - checkout
      - run:
          name: "Install microk8s & kubectl"
          command: |
            sudo apt-get update 
            sudo apt-get -y install snapd
            sudo snap install microk8s --channel=1.13/stable --classic
            sudo snap alias microk8s.kubectl kubectl
            snap info microk8s
      - run:
          name: "System setup"
          command: |
            echo 'export PATH=/snap/bin:$PATH' >> $BASH_ENV
            source $BASH_ENV
            sudo iptables -P FORWARD ACCEPT
      - run:
          name: "Start microk8s"
          command: |
            sudo microk8s.start
            sudo microk8s.status --wait-ready
            sudo microk8s.enable dns
            kubectl get all --all-namespaces
      - run: 
          name: "Install Helm"
          command: |
            curl -L https://git.io/get_helm.sh | bash
            helm init --service-account default --wait
      - run: .circleci/helm-test.sh oathkeeper
      - run: .circleci/helm-test.sh hydra

  release:
    docker:
      - image: circleci/golang:1.12
    working_directory: /go/src/github.com/ory/k8s
    steps:
      - checkout
      - run: curl -L https://git.io/get_helm.sh | bash
      - run: helm init --client-only
      - run: helm package -d docs/helm/charts/ ./helm/charts/oathkeeper/ --version `echo $CIRCLE_TAG | sed s/v//g`
      - run: helm package -d docs/helm/charts/ ./helm/charts/hydra/ --version `echo $CIRCLE_TAG | sed s/v//g`
{'fraction_non_alphanumeric': 0.11282689912826899, 'fraction_numerical': 0.017185554171855542, 'mean_word_length': 1.6248366013071895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1415861', 'n_tokens_mistral': 1442, 'n_tokens_neox': 1311, 'n_words': 327}