Skip to content

Commit

Permalink
Migrate build, deploy & release system to BuildKite.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arik Kfir committed Nov 1, 2017
1 parent 3009a73 commit 98a16a6
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 37 deletions.
6 changes: 6 additions & 0 deletions .buildkite/build.pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
steps:

- label: Build Docker image
command:
- gcloud docker -- build --tag gcr.io/infolinks-gcr/k8s-ingress-networks:${BUILDKITE_COMMIT} .
- gcloud docker -- push gcr.io/infolinks-gcr/k8s-ingress-networks:${BUILDKITE_COMMIT}
9 changes: 9 additions & 0 deletions .buildkite/release.pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
steps:

- label: Build versioned Docker image
command:
- gcloud docker -- pull gcr.io/infolinks-gcr/k8s-ingress-networks:${BUILDKITE_COMMIT}
- gcloud docker -- tag gcr.io/infolinks-gcr/k8s-ingress-networks:${BUILDKITE_COMMIT} infolinks/k8s-ingress-networks:${VERSION}
- gcloud docker -- push infolinks/k8s-ingress-networks:${VERSION}
- gcloud docker -- tag gcr.io/infolinks-gcr/k8s-ingress-networks:${BUILDKITE_COMMIT} infolinks/k8s-ingress-networks:latest
- gcloud docker -- push infolinks/k8s-ingress-networks:latest
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .travis/build.sh

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# k8s-ingress-networks

[![Build Status](https://travis-ci.org/infolinks/k8s-ingress-networks.svg?branch=master)](https://travis-ci.org/infolinks/k8s-ingress-networks)
[![Build status](https://badge.buildkite.com/6cf1a63094e63e217070a9ed4bbdebf744984160cdd34d4f05.svg)](https://buildkite.com/infolinks/k8s-ingress-networks)

Container for continually ensuring that a Kubernetes Ingress resources is restricted only to a set of whitelisted
networks (CIDR ranges) based on a list of named networks.
networks (CIDR ranges) based on a list of named networks.

This container will:

Expand All @@ -18,7 +18,7 @@ between network names and CIDR ranges.

When running externally to a Kubernetes cluster, make sure that you configure `kubectl` to properly access your cluster.

If this container is running inside a Kubernetes cluster, you just need to make sure the `Pod` running this container
If this container is running inside a Kubernetes cluster, you just need to make sure the `Pod` running this container
has the RBAC permissions to use `kubectl`.

## Contributions
Expand Down
15 changes: 9 additions & 6 deletions scan-ingress-networks.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/usr/bin/env bash

CONFIG_MAP_NAMESPACE=${CONFIG_MAP_NAMESPACE}
if [[ -z "${CONFIG_MAP_NAMESPACE}" ]]; then
echo "Environment variable 'CONFIG_MAP_NAMESPACE' not defined" >&2
exit 1
# small IntelliJ hack to prevent warning on non-existing variables
if [[ "THIS_WILL_NEVER_BE_TRUE" == "true" ]]; then
CONFIG_MAP_NAMESPACE=${CONFIG_MAP_NAMESPACE}
CONFIG_MAP_NAME=${CONFIG_MAP_NAME}
fi

CONFIG_MAP_NAME=${CONFIG_MAP_NAME}
if [[ -z "${CONFIG_MAP_NAME}" ]]; then
# validate required parameters
if [[ -z "${CONFIG_MAP_NAMESPACE}" ]]; then
echo "environment variable 'CONFIG_MAP_NAMESPACE' not defined" >&2
exit 1
elif [[ -z "${CONFIG_MAP_NAME}" ]]; then
echo "Environment variable 'CONFIG_MAP_NAME' not defined" >&2
exit 1
fi
Expand Down

0 comments on commit 98a16a6

Please sign in to comment.