diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 7a43970fc..000000000 --- a/.drone.yml +++ /dev/null @@ -1,1395 +0,0 @@ ---- -kind: pipeline -name: amd64 - -platform: - os: linux - arch: amd64 - -steps: - - name: validate - image: rancher/dapper:v0.6.0 - commands: - - dapper ci - environment: - REGISTRY_ENDPOINT: - from_secret: REGISTRY_ENDPOINT - volumes: - - name: docker - path: /var/run/docker.sock - - - name: mirror-images - image: rancher/dapper:v0.6.0 - commands: - - dapper mirror-images - environment: - REGISTRY_ENDPOINT: - from_secret: REGISTRY_ENDPOINT - REGISTRY_USERNAME: - from_secret: REGISTRY_USERNAME - REGISTRY_PASSWORD: - from_secret: REGISTRY_PASSWORD - volumes: - - name: docker - path: /var/run/docker.sock - depends_on: - - validate - when: - ref: - include: - - "refs/heads/release-v*" - event: - - push - instance: - - drone-publish.rancher.io - - - name: upload - pull: default - image: plugins/gcs - settings: - acl: - - allUsers:READER - cache_control: "public,no-cache,proxy-revalidate" - source: data - target: releases.rancher.com/kontainer-driver-metadata/${DRONE_BRANCH} - token: - from_secret: google_auth_key - when: - event: - - push - depends_on: - - validate - - mirror-images - - - name: dispatch - image: curlimages/curl:7.81.0 - user: root - environment: - PAT_USERNAME: - from_secret: pat_username - PAT_TOKEN: - from_secret: github_token - commands: - - apk -U --no-cache add bash - - scripts/dispatch - when: - event: - - push - depends_on: - - upload - -volumes: -- name: docker - host: - path: /var/run/docker.sock ---- - -kind: pipeline -name: provisioning-tests-rke2-1-30 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "30" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-tests-rke2-1-29 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "29" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-tests-rke2-1-28 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "28" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-tests-rke2-1-27 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "27" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-tests-rke2-1-26 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "26" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-tests-rke2-1-25 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "25" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote ---- - -kind: pipeline -name: provisioning-tests-k3s-1-30 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "30" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-tests-k3s-1-29 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "29" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-tests-k3s-1-28 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "28" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-tests-k3s-1-27 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "27" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-tests-k3s-1-26 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "26" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-tests-k3s-1-25 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" - KDM_TEST_K8S_MINOR: "25" - -steps: - - name: provisioning-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-rke2-1-30 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "30" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-rke2-1-29 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "29" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-rke2-1-28 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "28" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-rke2-1-27 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "27" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-rke2-1-26 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "26" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-rke2-1-25 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "rke2" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "25" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-k3s-1-30 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "30" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-k3s-1-29 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "29" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-k3s-1-28 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "28" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-k3s-1-27 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "27" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-k3s-1-26 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "26" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: provisioning-operations-tests-k3s-1-25 - -platform: - os: linux - arch: amd64 - -environment: - V2PROV_TEST_DIST: "k3s" - V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" - KDM_TEST_K8S_MINOR: "25" - -steps: - - name: provisioning-operations-tests-pr - image: rancher/dapper:v0.6.0 - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - - name: provisioning-operations-tests-push - image: rancher/dapper:v0.6.0 - failure: ignore - commands: - - dapper provisioning-tests - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - instance: - - drone-publish.rancher.io - ref: - include: - - "refs/heads/dev-v2.*" - event: - - push - -volumes: - - name: docker - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - promote - ---- - -kind: pipeline -name: fossa - -steps: -- name: fossa - image: rancher/drone-fossa:latest - failure: ignore - settings: - api_key: - from_secret: FOSSA_API_KEY - when: - instance: - - drone-publish.rancher.io - diff --git a/.github/runs-on.yml b/.github/runs-on.yml new file mode 100644 index 000000000..b1bfde5c9 --- /dev/null +++ b/.github/runs-on.yml @@ -0,0 +1 @@ +_extends: .github-private diff --git a/.github/workflows/provisioning-tests.yaml b/.github/workflows/provisioning-tests.yaml new file mode 100644 index 000000000..b427e87e8 --- /dev/null +++ b/.github/workflows/provisioning-tests.yaml @@ -0,0 +1,78 @@ +name: Provisioning tests + +on: + push: + branches: + - 'dev-v*' + - 'release-v*' + pull_request: + branches: + - 'dev-v*' + - 'release-v*' + +jobs: + provisioning-test: + permissions: + contents: read + runs-on: runs-on,runner=4cpu-linux-x64,image=legacy-cgroups-for-x64,run-id=${{ github.run_id }} + container: + image: rancher/dapper:v0.6.0 + options: --privileged + timeout-minutes: 90 + strategy: + matrix: + dist: [rke2, k3s] + k8s-minor: [27, 28, 29, 30] + fail-fast: false + steps: + - name: Force Install GIT latest + run: | + apk add git --update-cache + git --version + git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: "0" + - name: Provisioning test + run: | + dapper provisioning-tests + env: + V2PROV_TEST_DIST: ${{ matrix.dist }} + V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" + KDM_TEST_K8S_MINOR: ${{ matrix.k8s-minor }} + PREV_COMMIT_PR_SHA: ${{ github.event.pull_request.base.sha }} + PREV_COMMIT_PUSH_SHA: ${{ github.event.before }} + + provisioning-operations-test: + permissions: + contents: read + runs-on: runs-on,runner=4cpu-linux-x64,image=legacy-cgroups-for-x64,run-id=${{ github.run_id }} + container: + image: rancher/dapper:v0.6.0 + options: --privileged + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + dist: [rke2, k3s] + k8s-minor: [27, 28, 29, 30] + steps: + - name: Force Install GIT latest + run: | + apk add git --update-cache + git --version + git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: "0" + - name: Provisioning Operations tests + run: | + dapper provisioning-tests + env: + V2PROV_TEST_DIST: ${{ matrix.dist }} + V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" + KDM_TEST_K8S_MINOR: ${{ matrix.k8s-minor }} + PREV_COMMIT_PR_SHA: ${{ github.event.pull_request.base.sha }} + PREV_COMMIT_PUSH_SHA: ${{ github.event.before }} \ No newline at end of file diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 067c510b0..1b7eaaee1 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -20,13 +20,13 @@ jobs: container: image: rancher/dapper:v0.6.0 steps: + - name: Force Install GIT latest + run: | + apk add git --update-cache + git --version + git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Checkout code uses: actions/checkout@v4 - - name: Retrieve Registy secrets from vault - uses: rancher-eio/read-vault-secrets@main - with: - secrets: | - secret/data/github/repo/${{ github.repository }}/registry-endpoint/credentials token | REGISTRY_ENDPOINT ; - name: Validate run: dapper ci diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 18772c4a8..2bacac1a3 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -79,14 +79,15 @@ RUN if [[ "${ARCH}" == "amd64" ]]; then \ ENV YQ_VERSION v4.41.1 RUN wget -q https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${ARCH}.tar.gz -O - | tar xz && mv yq_linux_${ARCH} /usr/bin/yq -ENV DAPPER_ENV REPO TAG CI DRONE_BUILD_NUMBER DRONE_BUILD_EVENT DRONE_TAG DRONE_COMMIT_BEFORE \ +ENV DAPPER_ENV REPO TAG CI \ + PREV_COMMIT_PR_SHA PREV_COMMIT_PUSH_SHA GITHUB_EVENT_NAME GITHUB_RUN_NUMBER GITHUB_REF_TYPE GITHUB_REF_NAME \ REGISTRY_ENDPOINT REGISTRY_USERNAME REGISTRY_PASSWORD \ V2PROV_TEST_DIST V2PROV_TEST_RUN_REGEX KDM_TEST_K8S_MINOR DEBUG ENV DAPPER_SOURCE /go/src/github.com/rancher/kontainer-driver-metadata ENV DAPPER_DOCKER_SOCKET true ARG CI -ARG DRONE_BUILD_NUMBER -ENV DAPPER_RUN_ARGS "--privileged --label CI=${CI} --label DRONE_BUILD_NUMBER=${DRONE_BUILD_NUMBER}" +ARG GITHUB_RUN_NUMBER +ENV DAPPER_RUN_ARGS "--privileged --label CI=${CI} --label DRONE_BUILD_NUMBER=${GITHUB_RUN_NUMBER}" ENV HOME ${DAPPER_SOURCE} ENV GOPATH /go VOLUME /var/lib/rancher diff --git a/scripts/dispatch b/scripts/dispatch deleted file mode 100755 index 6c3e024d6..000000000 --- a/scripts/dispatch +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -set -e -set -x - -REPO="https://api.github.com/repos/rancher/rke/actions/workflows/git-actions-go-generate.yml/dispatches" - -case $DRONE_BRANCH in - dev-v2.8|release-v2.8) - ACTION_TARGET_BRANCH="release/v1.6" - ;; - *) - echo "Not a valid branch, not dispatching event" - exit 0 -esac - -echo "DRONE_BRANCH: $DRONE_BRANCH" -echo "DRONE_COMMIT_AUTHOR: $DRONE_COMMIT_AUTHOR" - -echo "Dispatching to branch ${ACTION_TARGET_BRANCH}" - -# send dispatch event to workflow -curl -XPOST -u "${PAT_USERNAME}:${PAT_TOKEN}" \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Content-Type: application/json" $REPO \ - --data '{"ref": "'"$ACTION_TARGET_BRANCH"'","inputs":{"source_author":"'"$DRONE_COMMIT_AUTHOR"'"}}' diff --git a/scripts/provisioning-tests b/scripts/provisioning-tests index 0e226125f..9015d56a1 100755 --- a/scripts/provisioning-tests +++ b/scripts/provisioning-tests @@ -26,6 +26,19 @@ if [ -z "${CHANNELS_FILE}" ]; then esac fi +# Set previous commit SHA + +env + +if [ "${GITHUB_EVENT_NAME}" == "push" ]; then + export PREV_COMMIT_SHA=${PREV_COMMIT_PUSH_SHA} +elif [ "${GITHUB_EVENT_NAME}" == "pull_request" ]; then + export PREV_COMMIT_SHA=${PREV_COMMIT_PR_SHA} +fi + +# To be removed/changed once drone setup is removed from rancher/rancher repo. +export DRONE_BUILD_NUMBER=${GITHUB_RUN_NUMBER} + if ! ./scripts/test-run-required.sh; then exit fi @@ -64,7 +77,7 @@ if [ -z "${SOME_K8S_VERSION}" ]; then # Get git diff in relevant channel file, find all added versions matching k8s minor, and get the last one # There should never be a version of a given distro with multiple patches on the same minor added at the same time # This command should be in sync with the one in test-run-required.sh - SOME_K8S_VERSION=$(git --no-pager diff --no-color -G "^ - version:" $DRONE_COMMIT_BEFORE -- "$CHANNELS_FILE" | grep -P "(^\+\s+- version: v1.$KDM_TEST_K8S_MINOR)" | sed 's/\(^\+\s\+- version: \)//' | tail -n 1) + SOME_K8S_VERSION=$(git --no-pager diff --no-color -G "^ - version:" $PREV_COMMIT_SHA -- "$CHANNELS_FILE" | grep -P "(^\+\s+- version: v1.$KDM_TEST_K8S_MINOR)" | sed 's/\(^\+\s\+- version: \)//' | tail -n 1) else # Only possible when not running in CI and env var is not provided, in this case just use latest from data.json SOME_K8S_VERSION=$(jq -r ".$V2PROV_TEST_DIST.releases[-1].version" <"$METADATA_DIR/data.json") @@ -80,7 +93,7 @@ cd "$RANCHER_DIR" # Uncomment to get provisioning tests to write commands being run to stdout #sed -i '2s/set -e/set -ex/' ./scripts/provisioning-tests -# Uncomment to get startup logs. Don't leave them on because it slows drone down too much +# Uncomment to get startup logs. Don't leave them on because it slows github actions down too much #sed -i '110s/#//' ./scripts/provisioning-tests #sed -i '111s/#//' ./scripts/provisioning-tests #sed -i '141s/#//' ./scripts/provisioning-tests diff --git a/scripts/test-run-required.sh b/scripts/test-run-required.sh index e8dba7dd0..28906fe5b 100755 --- a/scripts/test-run-required.sh +++ b/scripts/test-run-required.sh @@ -2,7 +2,7 @@ set -ex echo "Checking if rancher integration testing is required" -echo "Environment variable DRONE_BUILD_EVENT is ${DRONE_BUILD_EVENT}" +echo "Environment variable GITHUB_EVENT_NAME is ${GITHUB_EVENT_NAME}" if [ -z "$CI" ]; then echo "Not running in CI, rancher integration testing is required" @@ -14,15 +14,15 @@ if [ -z "$KDM_TEST_K8S_MINOR" ]; then exit 1 fi -if [ -z "$DRONE_COMMIT_BEFORE" ]; then - echo "Error: DRONE_COMMIT_BEFORE not defined. This should not be happening in CI" +if [ -z "$PREV_COMMIT_SHA" ]; then + echo "Error: PREV_COMMIT_SHA not defined. This should not be happening in CI" exit 1 fi -# Only run check if Drone build event is 'push' or 'pull_request' -if [ "${DRONE_BUILD_EVENT}" = "push" ] || [ "${DRONE_BUILD_EVENT}" = "pull_request" ]; then +# Only run check if Github build event is 'push' or 'pull_request' +if [ "${GITHUB_EVENT_NAME}" = "push" ] || [ "${GITHUB_EVENT_NAME}" = "pull_request" ]; then # Check if the channels file contains changes to versions from the minor version - if [ "$(git --no-pager diff --no-color -G "^ - version:" $DRONE_COMMIT_BEFORE -- "$CHANNELS_FILE" | grep -c -P "(^\+\s+- version: v1.$KDM_TEST_K8S_MINOR)")" -ne 0 ]; then + if [ "$(git --no-pager diff --no-color -G "^ - version:" $PREV_COMMIT_SHA -- "$CHANNELS_FILE" | grep -c -P "(^\+\s+- version: v1.$KDM_TEST_K8S_MINOR)")" -ne 0 ]; then exit 0 fi fi diff --git a/scripts/validate-ci b/scripts/validate-ci index 08edea2fc..86e11858d 100755 --- a/scripts/validate-ci +++ b/scripts/validate-ci @@ -25,6 +25,3 @@ fi echo Checking if released versions are not changed go run ./pkg/validation/validation.go release-v2.8 - -echo Checking the generated regsync.yaml file -regsync check --config ./regsync.yaml diff --git a/scripts/version b/scripts/version index 41a617373..979b3574a 100644 --- a/scripts/version +++ b/scripts/version @@ -5,7 +5,11 @@ if [ -n "$(git status --porcelain --untracked-files=no)" ]; then fi COMMIT=$(git rev-parse --short HEAD) -GIT_TAG=${DRONE_TAG:-$(git tag -l --contains HEAD | head -n 1)} + +GIT_TAG=$(git tag -l --contains HEAD | head -n 1) +if [[ "$GITHUB_EVENT_NAME" = "push" && "$GITHUB_REF_TYPE" = "tag" ]]; then + GIT_TAG=$GITHUB_REF_NAME +fi if [[ -z "$DIRTY" && -n "$GIT_TAG" ]]; then VERSION=$GIT_TAG