Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
322 changes: 167 additions & 155 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,168 +100,180 @@ stages:

jobs:
include:

## Project check stage jobs ##

# Run the sanity tests
- stage: check
name: Sanity Tests
script:
- make test-sanity

# - stage: check
# name: Sanity Tests
# script:
# - make test-sanity
#
# # Run the markdown link checker
# - name: Markdown Tests
# script:
# - make test-markdown
#
# Run the markdown link checker
- name: Markdown Tests
before_script:
- echo $TRAVIS_BUILD_DIR
- echo $(pwd)
- echo $(TRAVIS_BUILD_DIR)
- docker run --rm -i -v "$TRAVIS_BUILD_DIR:/src" -v "$TRAVIS_BUILD_DIR/_public:/target" klakegg/hugo:0.69.2-ext-ubuntu -s website
- go get -u github.com/raviqqe/liche
script:
- make test-markdown
- liche -d $TRAVIS_BUILD_DIR/_public -r -c 2 $TRAVIS_BUILD_DIR/_public
allow_failures:
- name: Markdown Tests

## Operator test stage jobs ##

# Build and test ansible and test ansible using molecule
- stage: test
<<: *test
name: Ansible on Kubernetes
before_script:
- pip3 install --upgrade setuptools pip
- pip install --user ansible
script:
- make test-e2e-ansible
- make test-e2e-ansible-molecule

# Test subcommands
- <<: *test
name: Subcommands on Kubernetes
script: make test-subcommand

# Build and test go
- <<: *test
name: Go on Kubernetes
before_script:
- (cd / && go get github.com/mattn/goveralls)
script:
- make test-unit
- $GOPATH/bin/goveralls -service=travis-ci -coverprofile=coverage.out -repotoken=$COVERALLS_TOKEN
- make test-e2e-go
- make test-integration

# Build and test helm
- <<: *test
name: Helm on Kubernetes
script: make test-e2e-helm

## Image deploy/push stage jobs ##

# Build and deploy arm64 ansible-operator docker image
- stage: deploy
<<: *deploy
name: Docker image for ansible-operator (arm64)
arch: arm64
script:
- make image-build-ansible
- make image-push-ansible

# Build and deploy amd64 ansible-operator docker image
- <<: *deploy
name: Docker image for ansible-operator (amd64)
arch: amd64
script:
- make image-build-ansible
- make image-push-ansible

# Build and deploy ppc64le ansible-operator docker image
- <<: *deploy
name: Docker image for ansible-operator (ppc64le)
arch: ppc64le
script:
- make image-build-ansible
- make image-push-ansible

# Build and deploy s390x ansible-operator docker image
- <<: *deploy
name: Docker image for ansible-operator (s390x)
arch: s390x
script:
- make image-build-ansible
- make image-push-ansible

# Build and deploy arm64 helm-operator docker image
- <<: *deploy
name: Docker image for helm-operator (arm64)
arch: arm64
script:
- make image-build-helm
- make image-push-helm

# Build and deploy amd64 helm-operator docker image
- <<: *deploy
name: Docker image for helm-operator (amd64)
arch: amd64
script:
- make image-build-helm
- make image-push-helm

# Build and deploy ppc64le helm-operator docker image
- <<: *deploy
name: Docker image for helm-operator (ppc64le)
arch: ppc64le
script:
- make image-build-helm
- make image-push-helm

# Build and deploy s390x helm-operator docker image
- <<: *deploy
name: Docker image for helm-operator (s390x)
arch: s390x
script:
- make image-build-helm
- make image-push-helm

# Build and deploy arm64 scorecard-proxy docker image
- <<: *deploy
name: Docker image for scorecard-proxy (arm64)
arch: arm64
script:
- make image-build-scorecard-proxy
- make image-push-scorecard-proxy

# Build and deploy amd64 scorecard-proxy docker image
- <<: *deploy
name: Docker image for scorecard-proxy (amd64)
arch: amd64
script:
- make image-build-scorecard-proxy
- make image-push-scorecard-proxy

# Build and deploy ppc64le scorecard-proxy docker image
- <<: *deploy
name: Docker image for scorecard-proxy (ppc64le)
arch: ppc64le
script:
- make image-build-scorecard-proxy
- make image-push-scorecard-proxy

# Build and deploy s390x scorecard-proxy docker image
- <<: *deploy
name: Docker image for scorecard-proxy (s390x)
arch: s390x
script:
- make image-build-scorecard-proxy
- make image-push-scorecard-proxy

# Build and deploy ansible multi-arch manifest list
- stage: deploy-manifest-multiarch
<<: *manifest-deploy
name: Manifest list for ansible-operator
script:
- make image-push-ansible-multiarch

# Build and deploy helm multi-arch manifest list
- <<: *manifest-deploy
name: Manifest list for helm-operator
script:
- make image-push-helm-multiarch

# Build and deploy scorecard-proxy multi-arch manifest list
- <<: *manifest-deploy
name: Manifest list for scorecard-proxy
script:
- make image-push-scorecard-proxy-multiarch
# - stage: test
# <<: *test
# name: Ansible on Kubernetes
# before_script:
# - pip3 install --upgrade setuptools pip
# - pip install --user ansible
# script:
# - make test-e2e-ansible
# - make test-e2e-ansible-molecule
#
# # Test subcommands
# - <<: *test
# name: Subcommands on Kubernetes
# script: make test-subcommand
#
# # Build and test go
# - <<: *test
# name: Go on Kubernetes
# before_script:
# - (cd / && go get github.com/mattn/goveralls)
# script:
# - make test-unit
# - $GOPATH/bin/goveralls -service=travis-ci -coverprofile=coverage.out -repotoken=$COVERALLS_TOKEN
# - make test-e2e-go
# - make test-integration
#
# # Build and test helm
# - <<: *test
# name: Helm on Kubernetes
# script: make test-e2e-helm
#
# ## Image deploy/push stage jobs ##
#
# # Build and deploy arm64 ansible-operator docker image
# - stage: deploy
# <<: *deploy
# name: Docker image for ansible-operator (arm64)
# arch: arm64
# script:
# - make image-build-ansible
# - make image-push-ansible
#
# # Build and deploy amd64 ansible-operator docker image
# - <<: *deploy
# name: Docker image for ansible-operator (amd64)
# arch: amd64
# script:
# - make image-build-ansible
# - make image-push-ansible
#
# # Build and deploy ppc64le ansible-operator docker image
# - <<: *deploy
# name: Docker image for ansible-operator (ppc64le)
# arch: ppc64le
# script:
# - make image-build-ansible
# - make image-push-ansible
#
# # Build and deploy s390x ansible-operator docker image
# - <<: *deploy
# name: Docker image for ansible-operator (s390x)
# arch: s390x
# script:
# - make image-build-ansible
# - make image-push-ansible
#
# # Build and deploy arm64 helm-operator docker image
# - <<: *deploy
# name: Docker image for helm-operator (arm64)
# arch: arm64
# script:
# - make image-build-helm
# - make image-push-helm
#
# # Build and deploy amd64 helm-operator docker image
# - <<: *deploy
# name: Docker image for helm-operator (amd64)
# arch: amd64
# script:
# - make image-build-helm
# - make image-push-helm
#
# # Build and deploy ppc64le helm-operator docker image
# - <<: *deploy
# name: Docker image for helm-operator (ppc64le)
# arch: ppc64le
# script:
# - make image-build-helm
# - make image-push-helm
#
# # Build and deploy s390x helm-operator docker image
# - <<: *deploy
# name: Docker image for helm-operator (s390x)
# arch: s390x
# script:
# - make image-build-helm
# - make image-push-helm
#
# # Build and deploy arm64 scorecard-proxy docker image
# - <<: *deploy
# name: Docker image for scorecard-proxy (arm64)
# arch: arm64
# script:
# - make image-build-scorecard-proxy
# - make image-push-scorecard-proxy
#
# # Build and deploy amd64 scorecard-proxy docker image
# - <<: *deploy
# name: Docker image for scorecard-proxy (amd64)
# arch: amd64
# script:
# - make image-build-scorecard-proxy
# - make image-push-scorecard-proxy
#
# # Build and deploy ppc64le scorecard-proxy docker image
# - <<: *deploy
# name: Docker image for scorecard-proxy (ppc64le)
# arch: ppc64le
# script:
# - make image-build-scorecard-proxy
# - make image-push-scorecard-proxy
#
# # Build and deploy s390x scorecard-proxy docker image
# - <<: *deploy
# name: Docker image for scorecard-proxy (s390x)
# arch: s390x
# script:
# - make image-build-scorecard-proxy
# - make image-push-scorecard-proxy
#
# # Build and deploy ansible multi-arch manifest list
# - stage: deploy-manifest-multiarch
# <<: *manifest-deploy
# name: Manifest list for ansible-operator
# script:
# - make image-push-ansible-multiarch
#
# # Build and deploy helm multi-arch manifest list
# - <<: *manifest-deploy
# name: Manifest list for helm-operator
# script:
# - make image-push-helm-multiarch
#
# # Build and deploy scorecard-proxy multi-arch manifest list
# - <<: *manifest-deploy
# name: Manifest list for scorecard-proxy
# script:
# - make image-push-scorecard-proxy-multiarch
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ test: test-unit ## Run the tests
test-markdown:
./hack/check-markdown.sh

test-links:
./hack/check-hugo-links.sh

test-sanity: tidy build/operator-sdk lint
./hack/tests/sanity-check.sh

Expand Down
14 changes: 14 additions & 0 deletions hack/check-hugo-links.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -e

source ./hack/lib/common.sh

header_text "Building html and checking links"

klakegg/hugo:0.69.2-ext-ubuntu

pushd website
npm install postcss-cli autoprefixer
hugo
popd
6 changes: 5 additions & 1 deletion website/content/en/docs/ansible/reference/finalizers.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ define the mapping from your finalizer to a playbook or role by simply setting t
your top-level playbook or role with different variables set. The `watches.yaml`
finalizer configuration accepts the following options:

See [Ansible watches documentation][ansible-watches] for more
information.


#### name
`name` is required.
Expand All @@ -45,7 +48,6 @@ One of `playbook`, `role`, or `vars` must be provided. If `role` is not provided
will default to the role specified at the top level of the `watches.yaml` entry.

This field is identical to the top-level `role` field.
https://github.com/operator-framework/operator-sdk/blob/master/doc/ansible/user-guide.md#watches-file


#### vars
Expand Down Expand Up @@ -165,3 +167,5 @@ let the operator remove our finalizer and allow the resource to be deleted.

## Further reading
• [Kubernetes finalizers](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#finalizers)

[ansible-watches]:/docs/ansible/reference/watches/
2 changes: 1 addition & 1 deletion website/content/en/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (r *ReconcileMemcached) Reconcile(request reconcile.Request) (reconcile.Res

[kube-apiserver_options]: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/#options
[controller-runtime_faq]: https://github.com/kubernetes-sigs/controller-runtime/blob/master/FAQ.md#q-how-do-i-have-different-logic-in-my-reconciler-for-different-types-of-events-eg-create-update-delete
[finalizer]: https://github.com/operator-framework/operator-sdk/blob/master/doc/user-guide.md#handle-cleanup-on-deletion
[finalizer]: /docs/golang/quickstart/#handle-cleanup-on-deletion
[gc-metrics]:/docs/golang/monitoring/prometheus/#garbage-collection
[cr-faq]:https://github.com/kubernetes-sigs/controller-runtime/blob/master/FAQ.md
[client.Reader]:https://godoc.org/sigs.k8s.io/controller-runtime/pkg/client#Reader
Expand Down
Loading