Skip to content

Commit

Permalink
Ci docs (#15)
Browse files Browse the repository at this point in the history
* Remove cache during docker build

* Add some docs for Prow
  • Loading branch information
fabianvf authored Aug 25, 2020
1 parent 7c4c25c commit 41f01c3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,25 @@ You can run the `molecule` integration tests with the command:

These commands will create a directory called `ansible_collections` which should not be committed or added to the `.gitignore` (Tracking issue: https://github.com/ansible/ansible/issues/68499)


### Prow

This repository uses the OpenShift [Prow](https://github.com/kubernetes/test-infra/blob/master/prow/README.md) instance for testing against live OpenShift clusters.
The configuration for the CI jobs that this repository runs can be found in the [`openshift/release repository`](https://github.com/openshift/release/blob/master/ci-operator/config/ansible-collections/community.okd/ansible-collections-community.okd-main.yaml).

The [Prow CI integration test job](https://github.com/openshift/release/blob/master/ci-operator/config/ansible-collections/community.okd/ansible-collections-community.okd-main.yaml#L35-L38)
runs the command:

make test-integration-incluster

which will create a job that runs the normal `make integration` target. In order to mimic the Prow CI job, you must
first build the test image using the Dockerfile in [`ci/Dockerfile`](ci/Dockerfile). Then, push the image
somewhere that it will be accessible to the cluster, and run

IMAGE_FORMAT=<your image> make test-integration-incluser

where the `IMAGE_FORMAT` environment variable is the full reference to your container (ie, `IMAGE_FORMAT=quay.io/example/molecule-test-runner`)

## Publishing New Versions

The current process for publishing new versions of the OKD Collection is manual, and requires a user who has access to the `community.okd` namespace on Ansible Galaxy to publish the build artifact.
Expand Down
8 changes: 5 additions & 3 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ RUN yum install -y \
python3-devel \
python3-pip \
python3-setuptools \
&& pip3 install --upgrade setuptools pip \
&& pip3 install \
&& pip3 install --no-cache-dir --upgrade setuptools pip \
&& pip3 install --no-cache-dir \
openshift \
ansible \
molecule
molecule \
&& yum clean all \
&& rm -rf $HOME/.cache

COPY . /opt/ansible

Expand Down
2 changes: 1 addition & 1 deletion ci/incluster_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -x

# IMAGE_FORMAT be in the form $registry/$org/$image:$$component, ie
# IMAGE_FORMAT is in the form $registry/$org/$image:$$component, ie
# quay.io/openshift/release:$component
# To test with your own image, build and push the test image
# (using the Dockerfile in ci/Dockerfile)
Expand Down

0 comments on commit 41f01c3

Please sign in to comment.