The scripts to build and test kubernetes in jenkins.
Clone or download
Pull request Compare This branch is 285 commits behind juju-solutions:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
build-and-push-charms.sh
build-and-release-k8s-snaps.sh
build-cni.sh
build-etcd.sh
build-flannel.sh
build-kubeadm-edge-snap.sh
build-kubernetes.sh
charm-push-kubernetes-charms.sh
define-juju.sh
export-local-env.sh
gubernator.sh
jenkins-build-addons-snap.sh
jenkins-build-resources.sh
jenkins-charm-e2e.sh
jenkins-deploy-local-charms.sh
jenkins-e2e.sh
jenkins-fresh-resources.sh
jenkins-git-bundle-e2e.sh
jenkins-release-bundle-to-channel.sh
jenkins-release-bundles.sh
jenkins-release-charms.sh
jenkins-repackage-resources.sh
jenkins-test-bundles.sh
juju-attach-resources.sh
juju-deploy-git-bundle.sh
juju-deploy-local-charms.sh
juju-deploy-test-bundle.sh
local-e2e.sh
promote-snaps.sh
repackage-easyrsa.sh
repackage-flannel.sh
repackage-kubernetes.sh
run-bundletester.sh
run-e2e-tests.sh
utilities.sh
versions.sh
wait-cluster-ready.sh

README.md

Kubernetes Jenkins scripts

This project contains the scripts to build and test Kubernetes in Jenkins. These scripts assume Docker is installed on the Jenkins runner for isolation and limiting many package dependencies. Some of the scripts rely on Jenkins environment variables but efforts have been made to be able to run the scripts locally (not on a Jenkins server).

jenkins_e2e.sh

Deploy a Kubernetes cluster with Juju and run the end to end (e2e) tests against the cluster capturing the output. This script uses the e2e-runner.sh to deploy the environment and run the tests, and gubernator.sh to upload the results to a Google storage bucket which is published to Kubernetes.

local_e2e.sh

The same as the jenkins_e2e.sh script but the ability to run it locally. This script uses export-local-env.sh to set the Jenkins environment variables before running.Ensure docker is installed and running on the local system before attempting to run this script.

Usage

  1. Create a "Freestyle project" in Jenkins.
  2. Select "Git" under Source Code Management section.
  3. Enter "https://github.com/juju-solutions/kubernetes-jenkins.git" in the Repository URL field.
  4. Click on "Add a build step" in the Build section.
  5. Select "Execute shell"
  6. Enter a local path to the script you wish to use such as ./jenkins_e2e.sh
  7. Save the script.
  8. Run the script.