Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Split pipeline in module stages #14484

Merged
merged 3 commits into from
Nov 27, 2019
Merged
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
13 changes: 13 additions & 0 deletions .ci/scripts/install-docker-compose.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -exuo pipefail

MSG="parameter missing."
DOCKER_COMPOSE_VERSION=${DOCKER_COMPOSE_VERSION:?$MSG}
HOME=${HOME:?$MSG}
DC_CMD="${HOME}/bin/docker-compose"

mkdir -p "${HOME}/bin"

curl -sSLo "${DC_CMD}" "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)"
chmod +x "${DC_CMD}"
19 changes: 19 additions & 0 deletions .ci/scripts/install-go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -exuo pipefail

MSG="parameter missing."
GO_VERSION=${GO_VERSION:?$MSG}
PROPERTIES_FILE=${PROPERTIES_FILE:-"go_env.properties"}
HOME=${HOME:?$MSG}
ARCH=$(uname -s| tr '[:upper:]' '[:lower:]')
GVM_CMD="${HOME}/bin/gvm"

mkdir -p "${HOME}/bin"

curl -sSLo "${GVM_CMD}" "https://github.com/andrewkroh/gvm/releases/download/v0.2.1/gvm-${ARCH}-amd64"
chmod +x "${GVM_CMD}"

gvm ${GO_VERSION}|cut -d ' ' -f 2|tr -d '\"' > ${PROPERTIES_FILE}

eval $(gvm ${GO_VERSION})
go get -u github.com/kardianos/govendor
18 changes: 18 additions & 0 deletions .ci/scripts/kind-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@exekias as soon as we have this in, we should probably disable it in travis?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not having it in both places?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a more general comment. If we get the power of the Jenkins Pipeline in our repo, we should disable travis all together so we only have to worry about 1 flaky environment. And I'm sure @kuisathaverat guarantees us 100% availability for Jenkins 🤣

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess we can have this discussion once we feel comfortable with jenkins. One point to still having both in the past was that jenkins is not run by default for external contributions.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, forgot about this one. Would still be nice to have Jenkins also run for them by default, or at least the once which have signed the CLA.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@exekias @ruflin
One question about the k8s versions we test, Do we need to test versions lower than 1.11? I ask because minikube it is a little tricky to run in a VM, however kind is pretty easy but it only works on k8s +1.11

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be safe to drop versions older than 1.11, cc @odacremolbap

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If k8s causes trouble, I would suggest to drop it from the initial PR and then follow up.

Copy link
Contributor Author

@kuisathaverat kuisathaverat Nov 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is working with k8s versions "v1.16.2","v1.15.3","v1.14.6","v1.13.10","v1.12.10", and "v1.11.10"

set -exuo pipefail

MSG="parameter missing."
K8S_VERSION=${K8S_VERSION:?$MSG}
HOME=${HOME:?$MSG}
KBC_CMD="${HOME}/bin/kubectl"

mkdir -p "${HOME}/bin"

curl -sSLo "${KBC_CMD}" "https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl"
chmod +x "${KBC_CMD}"

GO111MODULE="on" go get sigs.k8s.io/kind@v0.5.1
kind create cluster --image kindest/node:${K8S_VERSION}

export KUBECONFIG="$(kind get kubeconfig-path)"
kubectl cluster-info
33 changes: 33 additions & 0 deletions .ci/scripts/minikube-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -exuo pipefail

MSG="parameter missing."
K8S_VERSION=${K8S_VERSION:?$MSG}
MINIKUBE_VERSION=${MINIKUBE_VERSION:?$MSG}
HOME=${HOME:?$MSG}

KBC_CMD="${HOME}/bin/kubectl"
MKB_CMD="${HOME}/bin/minikube"

export CHANGE_MINIKUBE_NONE_USER=true

mkdir -p "${HOME}/bin"

curl -sSLo "${KBC_CMD}" "https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl"
chmod +x "${KBC_CMD}"

curl -sSLo "${MKB_CMD}" "https://storage.googleapis.com/minikube/releases/${MINIKUBE_VERSION}/minikube-linux-amd64"
chmod +x "${MKB_CMD}"

mkdir -p "${HOME}/.kube" "${HOME}/.minikube"
touch "${HOME}/.kube/config"

minikube start --vm-driver=none --kubernetes-version=${K8S_VERSION} --logtostderr
minikube update-context

JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'
until kubectl get nodes -o jsonpath="${JSONPATH}" 2>&1 | grep -q "Ready=True"
do
echo "waiting for Minikube..."
sleep 5
done
Loading