diff --git a/.ci/common b/.ci/common index 0607d45..5e87ca5 100644 --- a/.ci/common +++ b/.ci/common @@ -5,6 +5,7 @@ slugify() { echo "$1" | sed -r 's/[^.a-zA-Z0-9]+/-/g' } +export ARCH=`uname -m` export IMAGE="openebs/rawfile-localpv" export COMMIT=$(git rev-parse --short HEAD) export BRANCH=${TRAVIS_BRANCH:-$(git rev-parse --abbrev-ref HEAD)} @@ -12,7 +13,7 @@ export BRANCH_SLUG=$(slugify $BRANCH) export CI_REGISTRY="docker.io" export CI_TAG="${COMMIT}-ci" -export CI_IMAGE_REPO="${CI_REGISTRY}/${IMAGE}" +export CI_IMAGE_REPO="${CI_REGISTRY}/${IMAGE}-${ARCH}" export CI_IMAGE_URI="${CI_IMAGE_REPO}:${CI_TAG}" function TagAndPushImage() { diff --git a/.ci/e2e-test/setup.sh b/.ci/e2e-test/setup.sh index d2b4644..43b945c 100755 --- a/.ci/e2e-test/setup.sh +++ b/.ci/e2e-test/setup.sh @@ -9,6 +9,7 @@ sudo apt update && sudo apt install -y conntrack curl -Lo minikube https://storage.googleapis.com/minikube/releases/v${MINIKUBE_VERSION}/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ mkdir -p $HOME/.kube $HOME/.minikube touch $KUBECONFIG +sudo systemctl enable docker.service sudo minikube start --profile=minikube --vm-driver=none --kubernetes-version=v${K8S_VERSION} minikube update-context --profile=minikube eval "$(minikube docker-env --profile=minikube)" && export DOCKER_CLI='docker' diff --git a/.travis.yml b/.travis.yml index c993527..ca560aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,7 @@ os: linux +services: + - docker + dist: bionic language: minimal jobs: @@ -18,3 +21,21 @@ jobs: - KUBECONFIG=$HOME/.kube/config - stage: publish script: ./.ci/publish.sh + - stage: build-arm + arch: arm64 + script: ./.ci/build.sh + - stage: e2e-test-arm + arch: arm64 + install: ./.ci/e2e-test/setup.sh + if: tag IS present OR commit_message =~ /perform-e2e/ + script: ./.ci/e2e-test/test.sh + env: + - CHANGE_MINIKUBE_NONE_USER=true + - MINIKUBE_WANTUPDATENOTIFICATION=false + - MINIKUBE_WANTREPORTERRORPROMPT=false + - MINIKUBE_HOME=$HOME + - CHANGE_MINIKUBE_NONE_USER=true + - KUBECONFIG=$HOME/.kube/config + - stage: publish-arm + arch: arm64 + script: ./.ci/publish.sh