Skip to content

Commit

Permalink
Merge pull request #5 from sighupio/develop
Browse files Browse the repository at this point in the history
Release v1.0.3
  • Loading branch information
nutellinoit authored Mar 27, 2024
2 parents e074df9 + cbe4185 commit dcecc10
Show file tree
Hide file tree
Showing 11 changed files with 300 additions and 198 deletions.
308 changes: 182 additions & 126 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,84 +118,69 @@ trigger:
- refs/tags/**

steps:
- name: init
image: quay.io/sighup/e2e-testing-drone-plugin:v1.26.4
- name: create Kind cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
pull: always
volumes:
- name: shared
path: /shared
depends_on: [ clone ]
settings:
action: custom-cluster-126
pipeline_id: cluster-126
local_kind_config_path: katalog/tests/kind/config.yml
cluster_version: '1.26.4'
instance_path: /shared
instance_size: 2-extra-large
aws_default_region:
from_secret: aws_region
aws_access_key_id:
from_secret: aws_access_key_id
aws_secret_access_key:
from_secret: aws_secret_access_key
terraform_tf_states_bucket_name:
from_secret: terraform_tf_states_bucket_name
vsphere_server:
from_secret: vsphere_server
vsphere_password:
from_secret: vsphere_password
vsphere_user:
from_secret: vsphere_user
dockerhub_username:
from_secret: dockerhub_username
dockerhub_password:
from_secret: dockerhub_password
- name: dockersock
path: /var/run/docker.sock
environment:
CLUSTER_VERSION: v1.26.6
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-${DRONE_STAGE_NAME}
# /drone/src is the default workdir for the pipeline
# using this folder we don't need to mount another
# shared volume between the steps
KUBECONFIG: /drone/src/kubeconfig-${DRONE_STAGE_NAME}
commands:
# create a custom config to disable Kind's default CNI so
# we can test using KFD's networking module.
- |
cat <<EOF > kind-config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
disableDefaultCNI: false
EOF
# NOTE: kind's `--wait` flag that waits for the control-plane ot be ready
# does not work when disabling the default CNI. It will always go in timeout.
- kind create cluster --name $${CLUSTER_NAME} --image registry.sighup.io/fury/kindest/node:$${CLUSTER_VERSION} --config kind-config.yaml
# save the kubeconfig so we can use it from other steps.
- kind get kubeconfig --name $${CLUSTER_NAME} > $${KUBECONFIG}

- name: e2e
# KUBECTL 1.25.3 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
# KUBECTL 1.27.1 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
image: quay.io/sighup/e2e-testing:1.1.0_0.11.0_3.1.1_1.9.4_1.26.3_3.5.3_4.33.3
pull: always
volumes:
- name: shared
path: /shared
depends_on: [ init ]
network_mode: host
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-${DRONE_STAGE_NAME}
KUBECONFIG: /drone/src/kubeconfig-${DRONE_STAGE_NAME}
FURYCTL_VERSION: v0.27.2
depends_on: [create Kind cluster]
commands:
- export KUBECONFIG=/shared/kube/kubeconfig-126
- bats -t katalog/tests/tests.sh

- name: destroy
image: quay.io/sighup/e2e-testing-drone-plugin:v1.26.4
pull: always
depends_on: [ e2e ]
settings:
action: destroy
pipeline_id: cluster-126
aws_default_region:
from_secret: aws_region
aws_access_key_id:
from_secret: aws_access_key_id
aws_secret_access_key:
from_secret: aws_secret_access_key
terraform_tf_states_bucket_name:
from_secret: terraform_tf_states_bucket_name
vsphere_server:
from_secret: vsphere_server
vsphere_password:
from_secret: vsphere_password
vsphere_user:
from_secret: vsphere_user
dockerhub_username:
from_secret: dockerhub_username
dockerhub_password:
from_secret: dockerhub_password
- name: delete-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
volumes:
- name: dockersock
path: /var/run/docker.sock
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-${DRONE_STAGE_NAME}
commands:
# does not matter if the command fails
- kind delete cluster --name $${CLUSTER_NAME} || true
depends_on:
- e2e
when:
status:
- success
- failure

volumes:
- name: shared
temp: {}
- name: dockersock
host:
path: /var/run/docker.sock
---
name: e2e-kubernetes-1.27
kind: pipeline
Expand All @@ -219,85 +204,155 @@ trigger:
- refs/tags/**

steps:
- name: init
image: quay.io/sighup/e2e-testing-drone-plugin:v1.27.1
- name: create Kind cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
pull: always
volumes:
- name: shared
path: /shared
depends_on: [ clone ]
settings:
action: custom-cluster-127
pipeline_id: cluster-127
local_kind_config_path: katalog/tests/kind/config.yml
cluster_version: "1.27.1"
instance_path: /shared
instance_size: 2-extra-large
aws_default_region:
from_secret: aws_region
aws_access_key_id:
from_secret: aws_access_key_id
aws_secret_access_key:
from_secret: aws_secret_access_key
terraform_tf_states_bucket_name:
from_secret: terraform_tf_states_bucket_name
vsphere_server:
from_secret: vsphere_server
vsphere_password:
from_secret: vsphere_password
vsphere_user:
from_secret: vsphere_user
dockerhub_username:
from_secret: dockerhub_username
dockerhub_password:
from_secret: dockerhub_password
- name: dockersock
path: /var/run/docker.sock
environment:
CLUSTER_VERSION: v1.27.3
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-${DRONE_STAGE_NAME}
# /drone/src is the default workdir for the pipeline
# using this folder we don't need to mount another
# shared volume between the steps
KUBECONFIG: /drone/src/kubeconfig-${DRONE_STAGE_NAME}
commands:
# create a custom config to disable Kind's default CNI so
# we can test using KFD's networking module.
- |
cat <<EOF > kind-config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
disableDefaultCNI: false
EOF
# NOTE: kind's `--wait` flag that waits for the control-plane ot be ready
# does not work when disabling the default CNI. It will always go in timeout.
- kind create cluster --name $${CLUSTER_NAME} --image registry.sighup.io/fury/kindest/node:$${CLUSTER_VERSION} --config kind-config.yaml
# save the kubeconfig so we can use it from other steps.
- kind get kubeconfig --name $${CLUSTER_NAME} > $${KUBECONFIG}

- name: e2e
# KUBECTL 1.27.1 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
image: quay.io/sighup/e2e-testing:1.1.0_0.11.0_3.12.0_1.9.4_1.27.1_3.5.3_4.33.3
image: quay.io/sighup/e2e-testing:1.1.0_0.11.0_3.1.1_1.9.4_1.26.3_3.5.3_4.33.3
pull: always
volumes:
- name: shared
path: /shared
depends_on: [ init ]
network_mode: host
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-${DRONE_STAGE_NAME}
KUBECONFIG: /drone/src/kubeconfig-${DRONE_STAGE_NAME}
FURYCTL_VERSION: v0.27.2
depends_on: [create Kind cluster]
commands:
- export KUBECONFIG=/shared/kube/kubeconfig-127
- bats -t katalog/tests/tests.sh

- name: destroy
image: quay.io/sighup/e2e-testing-drone-plugin:v1.27.1
pull: always
depends_on: [ e2e ]
settings:
action: destroy
pipeline_id: cluster-127
aws_default_region:
from_secret: aws_region
aws_access_key_id:
from_secret: aws_access_key_id
aws_secret_access_key:
from_secret: aws_secret_access_key
terraform_tf_states_bucket_name:
from_secret: terraform_tf_states_bucket_name
vsphere_server:
from_secret: vsphere_server
vsphere_password:
from_secret: vsphere_password
vsphere_user:
from_secret: vsphere_user
dockerhub_username:
from_secret: dockerhub_username
dockerhub_password:
from_secret: dockerhub_password
- name: delete-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
volumes:
- name: dockersock
path: /var/run/docker.sock
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-${DRONE_STAGE_NAME}
commands:
# does not matter if the command fails
- kind delete cluster --name $${CLUSTER_NAME} || true
depends_on:
- e2e
when:
status:
- success
- failure

volumes:
- name: shared
temp: {}
- name: dockersock
host:
path: /var/run/docker.sock
---
name: e2e-kubernetes-1.28
kind: pipeline
type: docker

depends_on:
- policeman

node:
runner: internal

platform:
os: linux
arch: amd64

trigger:
ref:
include:
- refs/heads/master
- refs/heads/main
- refs/tags/**

steps:
- name: create Kind cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
pull: always
volumes:
- name: dockersock
path: /var/run/docker.sock
environment:
CLUSTER_VERSION: v1.28.0
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-${DRONE_STAGE_NAME}
# /drone/src is the default workdir for the pipeline
# using this folder we don't need to mount another
# shared volume between the steps
KUBECONFIG: /drone/src/kubeconfig-${DRONE_STAGE_NAME}
commands:
# create a custom config to disable Kind's default CNI so
# we can test using KFD's networking module.
- |
cat <<EOF > kind-config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
disableDefaultCNI: false
EOF
# NOTE: kind's `--wait` flag that waits for the control-plane ot be ready
# does not work when disabling the default CNI. It will always go in timeout.
- kind create cluster --name $${CLUSTER_NAME} --image registry.sighup.io/fury/kindest/node:$${CLUSTER_VERSION} --config kind-config.yaml
# save the kubeconfig so we can use it from other steps.
- kind get kubeconfig --name $${CLUSTER_NAME} > $${KUBECONFIG}

- name: e2e
# KUBECTL 1.27.1 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
image: quay.io/sighup/e2e-testing:1.1.0_0.11.0_3.1.1_1.9.4_1.26.3_3.5.3_4.33.3
pull: always
network_mode: host
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-${DRONE_STAGE_NAME}
KUBECONFIG: /drone/src/kubeconfig-${DRONE_STAGE_NAME}
FURYCTL_VERSION: v0.27.2
depends_on: [create Kind cluster]
commands:
- bats -t katalog/tests/tests.sh

- name: delete-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
volumes:
- name: dockersock
path: /var/run/docker.sock
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-${DRONE_STAGE_NAME}
commands:
# does not matter if the command fails
- kind delete cluster --name $${CLUSTER_NAME} || true
depends_on:
- e2e
when:
status:
- success
- failure

volumes:
- name: dockersock
host:
path: /var/run/docker.sock
---
name: release
kind: pipeline
Expand All @@ -306,6 +361,7 @@ type: docker
depends_on:
- e2e-kubernetes-1.26
- e2e-kubernetes-1.27
- e2e-kubernetes-1.28

platform:
os: linux
Expand Down
Loading

0 comments on commit dcecc10

Please sign in to comment.