Files
odo/docs/ci-reference.md
Mohammed Ahmed 631b53d2a3 Adding scripts to handle initialization of cluster for openshift CI. (#1441)
* Adding scripts to handle initialization of cluster for openshift CI.

This also fixes couple of usernames on the side

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Adding http-tools to build root so we can use htpasswd

* Adding login as developer and creation of first project

* Moving script to ./scripts and renaming makefile command

* Renaming scripts to incude tests in configure cluster script

* Making script more configurable

* Adding namespace to secret commands.

* Fixing missing username

* Simplifying script by removing unnessasary variables

* Adding TODO and slightly reduction wait time for auth config

* Making assets dir overwritable

* Making configure script executable.

* Fixing message for not existing kubeconfig

* Redirecting out and err of commands where we are not interested in msg

* Updating to 18 secs default sleep which can be overridden

* Adding workaround for missing wildfly in OpenShift 4.0

* Adding basic ci docs for prow

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
2019-03-13 11:20:34 +05:30

1.9 KiB

How to run integration test job in Travis CI

For default oc, use the configuration in .travis.yaml. For example:

  # Run main e2e tests
    - <<: *base-test
      stage: test
      name: "Main e2e tests"
      script:
        - ./scripts/oc-cluster.sh
        - make bin
        - sudo cp odo /usr/bin
        - oc login -u developer
        - make test-main-e2e

If the need presents itself to run odo integration tests against a specific version of Openshift, use env variable OPENSHIFT_CLIENT_BINARY_URL to pass the released oc client URL in .travis.yaml. For oc v3.10.0, use the configuration:

  # Run main e2e tests
    - <<: *base-test
      stage: test
      name: "Main e2e tests"
      script:
        - OPENSHIFT_CLIENT_BINARY_URL=https://github.com/openshift/origin/releases/download/v3.10.0/openshift-origin-client-tools-v3.10.0-dd10d17-linux-64bit.tar.gz ./scripts/oc-cluster.sh
        - make bin
        - sudo cp odo /usr/bin
        - oc login -u developer
        - make test-main-e2e

How to run integtration tests on Prow

Prow is the Kubernetes / OpenShift way of managing workflow including tests. To get tests on there, you need to raise PR to openshift/release repository setting up appropriate ci operator config and job files. Reference for same is available there itself.

However note that prow gives you a bare bones cluster, so we need to preconfigure the same so that the cluster is in state expected such as auth being configured and so on.

You can do this by running $ make configure-installer-tests-cluster before running actual tests. This script is configurable with environment variables as

  • SLEEP_AFTER_SECRET_CREATION: The time to sleep after auth is configured. Default is 18 seconds
  • DEFAULT_INSTALLER_ASSETS_DIR: The location where OpenShift installer creates assets such as kube admin password and the kubeconfig file.