diff --git a/.drone.yml b/.drone.yml index fa48226a0ef..06478037dd4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -547,6 +547,214 @@ volumes: host: path: /var/run/docker.sock +trigger: + event: + exclude: + - promote +--- +kind: pipeline +name: default-linux-s390x + +platform: + os: linux + arch: amd64 + +# Hack needed for s390x: https://gist.github.com/colstrom/c2f359f72658aaabb44150ac20b16d7c#gistcomment-3858388 +node: + arch: s390x + +steps: +- name: build + image: rancher/dapper:v0.5.8 + failure: ignore + commands: + - K3S_BUILDER=k3s_root dapper ci + privileged: true + volumes: + - name: docker + path: /var/run/docker.sock + when: + event: + - push + - pull_request + - tag + +- name: stage-binaries + image: rancher/dapper:v0.5.8 + failure: ignore + commands: + - "cp -r ./bin/* ./package/" + when: + event: + - push + - tag + +- name: docker-publish-head + image: rancher/drone-docker-image-digests:v0.0.13 + failure: ignore + volumes: + - name: docker + path: /var/run/docker.sock + settings: + purge: false + build_args: + - ARCH=s390x + - VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head + - K3S_BUILDER=k3s_root + context: package/ + custom_dns: 1.1.1.1 + dockerfile: package/Dockerfile + tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-s390x + password: + from_secret: docker_password + repo: rancher/rancher + username: + from_secret: docker_username + when: + ref: + include: + - "refs/heads/master" + - "refs/heads/release/v*" + event: + - push + +- name: docker-publish-head-installer + image: rancher/drone-images:docker-s390x + failure: ignore + volumes: + - name: docker + path: /var/run/docker.sock + settings: + purge: false + build_args: + - ARCH=s390x + - VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head + - RANCHER_TAG=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-s390x + context: package/ + custom_dns: 1.1.1.1 + dockerfile: package/Dockerfile.installer + tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-s390x + password: + from_secret: docker_password + repo: rancher/system-agent-installer-rancher + username: + from_secret: docker_username + when: + ref: + include: + - "refs/heads/master" + - "refs/heads/release/v*" + event: + - push + +- name: docker-publish-head-agent + image: rancher/drone-images:docker-s390x + failure: ignore + volumes: + - name: docker + path: /var/run/docker.sock + settings: + purge: false + build_args: + - ARCH=s390x + - VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head + - RANCHER_TAG=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-s390x + context: package/ + custom_dns: 1.1.1.1 + dockerfile: package/Dockerfile.agent + tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-s390x + password: + from_secret: docker_password + repo: rancher/rancher-agent + username: + from_secret: docker_username + when: + ref: + include: + - "refs/heads/master" + - "refs/heads/release/v*" + event: + - push + +- name: docker-publish + image: rancher/drone-images:docker-s390x + failure: ignore + volumes: + - name: docker + path: /var/run/docker.sock + settings: + purge: false + build_args: + - ARCH=s390x + - "VERSION=${DRONE_TAG}" + context: package/ + custom_dns: 1.1.1.1 + dockerfile: package/Dockerfile + password: + from_secret: docker_password + repo: rancher/rancher + tag: "${DRONE_TAG}-linux-s390x" + username: + from_secret: docker_username + when: + event: + - tag + +- name: docker-publish-installer + image: rancher/drone-images:docker-s390x + failure: ignore + volumes: + - name: docker + path: /var/run/docker.sock + settings: + purge: false + build_args: + - ARCH=s390x + - "VERSION=${DRONE_TAG}" + - "RANCHER_TAG=${DRONE_TAG}-linux-s390x" + context: package/ + custom_dns: 1.1.1.1 + dockerfile: package/Dockerfile.installer + password: + from_secret: docker_password + repo: rancher/system-agent-installer-rancher + tag: "${DRONE_TAG}-linux-s390x" + username: + from_secret: docker_username + when: + event: + - tag + +- name: docker-publish-agent + image: rancher/drone-images:docker-s390x + failure: ignore + volumes: + - name: docker + path: /var/run/docker.sock + settings: + purge: false + build_args: + - ARCH=s390x + - "VERSION=${DRONE_TAG}" + - "RANCHER_TAG=${DRONE_TAG}-linux-s390x" + context: package/ + custom_dns: 1.1.1.1 + dockerfile: package/Dockerfile.agent + password: + from_secret: docker_password + repo: rancher/rancher-agent + tag: "${DRONE_TAG}-linux-s390x" + username: + from_secret: docker_username + when: + event: + - tag + +volumes: +- name: docker + host: + path: /var/run/docker.sock + trigger: event: exclude: @@ -929,6 +1137,7 @@ steps: password: from_secret: docker_password spec: manifest-installer.tmpl + ignore_missing: true when: instance: include: @@ -945,6 +1154,7 @@ steps: password: from_secret: docker_password spec: manifest-installer-head.tmpl + ignore_missing: true when: instance: include: @@ -960,6 +1170,7 @@ steps: password: from_secret: docker_password spec: manifest-agent.tmpl + ignore_missing: true when: instance: include: @@ -976,6 +1187,7 @@ steps: password: from_secret: docker_password spec: manifest-agent-head.tmpl + ignore_missing: true when: instance: include: @@ -991,6 +1203,7 @@ steps: password: from_secret: docker_password spec: manifest-head.tmpl + ignore_missing: true when: instance: include: @@ -1006,6 +1219,7 @@ steps: password: from_secret: docker_password spec: manifest.tmpl + ignore_missing: true when: instance: include: @@ -1071,6 +1285,7 @@ trigger: depends_on: - default-linux-amd64 - default-linux-arm64 +- default-linux-s390x - default-windows-1809 - default-windows-20H2 - default-windows-ltsc2022 @@ -1159,6 +1374,52 @@ depends_on: - default-linux-arm64 --- kind: pipeline +name: docker-image-digests-linux-s390x + +platform: + os: linux + arch: amd64 + +# Hack needed for s390x: https://gist.github.com/colstrom/c2f359f72658aaabb44150ac20b16d7c#gistcomment-3858388 +node: + arch: s390x + +steps: +- name: docker-image-digests + image: rancher/drone-docker-digests:s390x + failure: ignore + environment: + PLUGIN_GITHUB_REPOSITORY: "rancher/rancher" + PLUGIN_GITHUB_TOKEN: + from_secret: github_token + PLUGIN_GITHUB_TAG: "${DRONE_TAG}" + PLUGIN_INPUT_FILE: "rancher-images.txt" + PLUGIN_OUTPUT_FILE: "rancher-images-digests-linux-s390x.txt" + PLUGIN_REGISTRY: "docker.io" + volumes: + - name: docker + path: /var/run/docker.sock + when: + instance: + include: + - drone-publish.rancher.io + event: + - tag + +volumes: +- name: docker + host: + path: /var/run/docker.sock + +trigger: + event: + exclude: + - promote + +depends_on: +- default-linux-s390x +--- +kind: pipeline name: docker-image-digests-windows-1809 platform: diff --git a/Dockerfile.dapper b/Dockerfile.dapper index ae5a8d362af..76c2298e1a4 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -1,3 +1,17 @@ +ARG K3S_BUILDER=rancher/k3s:v1.22.5-k3s1 + +# Use binaries from k3s root for s390x as k3s is not available on s390x +FROM registry.suse.com/suse/sle15:15.3 AS k3s_root +ARG DAPPER_HOST_ARCH +ENV ARCH=${DAPPER_HOST_ARCH} +ENV K3S_ROOT_VERSION v0.11.0 +ONBUILD RUN zypper -n in tar +ONBUILD ADD https://github.com/rancher/k3s-root/releases/download/${K3S_ROOT_VERSION}/k3s-root-${ARCH}.tar /k3s-root.tar +ONBUILD RUN tar xvf /k3s-root.tar; \ + touch /bin/cni /bin/containerd /bin/containerd-shim-runc-v2 /bin/runc + +FROM ${K3S_BUILDER} as k3s_builder + FROM registry.suse.com/suse/sle15:15.3 ARG DAPPER_HOST_ARCH @@ -9,7 +23,7 @@ ENV CATTLE_K3S_VERSION v1.22.5+k3s1 ENV CATTLE_HELM_UNITTEST_VERSION v0.1.7-rancher3 # helm 3 version ENV HELM_VERSION v3.7.1 -ENV KUSTOMIZE_VERSION v3.10.0 +ENV KUSTOMIZE_VERSION v4.4.1 # kontainer-driver-metadata branch to be set for specific branch other than dev/master, logic at rancher/rancher/pkg/settings/setting.go ENV CATTLE_KDM_BRANCH=dev-v2.6 @@ -19,10 +33,7 @@ RUN zypper install -y -f docker RUN curl -sLf https://github.com/rancher/machine/releases/download/${CATTLE_MACHINE_VERSION}/rancher-machine-${ARCH}.tar.gz | tar xvzf - -C /usr/bin -ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH_arm64=arm64 GOLANG_ARCH=GOLANG_ARCH_${ARCH} \ - GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash - -RUN curl -sLf https://storage.googleapis.com/golang/go1.16.9.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local +RUN zypper -n in go1.16 RUN if [ "${ARCH}" == "amd64" ]; then \ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.43.0; \ @@ -44,14 +55,16 @@ ENV HELM_URL_V2_amd64=https://github.com/rancher/helm/releases/download/${CATTLE RUN curl -sLf ${KUSTOMIZE_URL} | tar -xzf - -C /usr/bin -# set up helm 2 -RUN curl -sLf ${!HELM_URL_V2} -o /usr/bin/rancher-helm && \ - curl -sLf ${!TILLER_URL} -o /usr/bin/rancher-tiller && \ - chmod +x /usr/bin/rancher-helm /usr/bin/rancher-tiller && \ - ln -s /usr/bin/rancher-helm /usr/bin/helm && \ - ln -s /usr/bin/rancher-tiller /usr/bin/tiller && \ - helm init -c --stable-repo-url https://charts.helm.sh/stable/ && \ - helm plugin install https://github.com/rancher/helm-unittest +# set up helm 2 to all archs other than s390x +RUN if [ "${ARCH}" != "s390x" ]; then \ + curl -sLf ${!HELM_URL_V2} -o /usr/bin/rancher-helm && \ + curl -sLf ${!TILLER_URL} -o /usr/bin/rancher-tiller && \ + chmod +x /usr/bin/rancher-helm /usr/bin/rancher-tiller && \ + ln -s /usr/bin/rancher-helm /usr/bin/helm && \ + ln -s /usr/bin/rancher-tiller /usr/bin/tiller && \ + helm init -c --stable-repo-url https://charts.helm.sh/stable/ && \ + helm plugin install https://github.com/rancher/helm-unittest; \ + fi # set up helm 3 RUN mkdir /usr/tmp && \ @@ -60,7 +73,7 @@ RUN mkdir /usr/tmp && \ chmod +x /usr/bin/kustomize # Set up K3s: copy the necessary binaries from the K3s image. -COPY --from=rancher/k3s:v1.22.5-k3s1 \ +COPY --from=k3s_builder \ /bin/blkid \ /bin/charon \ /bin/cni \ @@ -103,7 +116,10 @@ RUN ln -s /usr/bin/cni /usr/bin/bridge && \ RUN mkdir -p /go/src/github.com/rancher/rancher/.kube && \ ln -s /etc/rancher/k3s/k3s.yaml /go/src/github.com/rancher/rancher/.kube/k3s.yaml -RUN curl -sLf https://github.com/rancher/k3s/releases/download/${CATTLE_K3S_VERSION}/k3s-images.txt -o /usr/tmp/k3s-images.txt +# Add k3s for all archs except s390x since k3s doesn't support s390x +RUN if [ "${ARCH}" != "s390x" ]; then \ + curl -sLf https://github.com/rancher/k3s/releases/download/${CATTLE_K3S_VERSION}/k3s-images.txt -o /usr/tmp/k3s-images.txt; \ + fi ENV YQ_URL=https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_${ARCH} RUN curl -sLf ${YQ_URL} -o /usr/bin/yq && chmod +x /usr/bin/yq diff --git a/manifest-agent-head.tmpl b/manifest-agent-head.tmpl index 60ff69b9c71..0d87393033b 100644 --- a/manifest-agent-head.tmpl +++ b/manifest-agent-head.tmpl @@ -28,3 +28,8 @@ manifests: architecture: amd64 os: windows version: ltsc2022 + - + image: rancher/rancher-agent:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-{{build.commit}}{{/if}}-linux-s390x + platform: + architecture: s390x + os: linux \ No newline at end of file diff --git a/manifest-agent.tmpl b/manifest-agent.tmpl index 4819b4ca6f0..fcb06cee93d 100644 --- a/manifest-agent.tmpl +++ b/manifest-agent.tmpl @@ -28,3 +28,8 @@ manifests: architecture: amd64 os: windows version: ltsc2022 + - + image: rancher/rancher-agent:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-{{build.commit}}{{/if}}-linux-s390x + platform: + architecture: s390x + os: linux diff --git a/manifest-head.tmpl b/manifest-head.tmpl index c4064801248..ca22eb35d70 100644 --- a/manifest-head.tmpl +++ b/manifest-head.tmpl @@ -10,3 +10,8 @@ manifests: platform: architecture: arm64 os: linux + - + image: rancher/rancher:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-{{build.commit}}{{/if}}-linux-s390x + platform: + architecture: s390x + os: linux \ No newline at end of file diff --git a/manifest-installer-head.tmpl b/manifest-installer-head.tmpl index 69f47f17464..0211fb4e260 100644 --- a/manifest-installer-head.tmpl +++ b/manifest-installer-head.tmpl @@ -10,3 +10,8 @@ manifests: platform: architecture: arm64 os: linux + - + image: rancher/system-agent-installer-rancher:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-{{build.commit}}{{/if}}-linux-s390x + platform: + architecture: s390x + os: linux diff --git a/manifest-installer.tmpl b/manifest-installer.tmpl index f599fff6356..44d63878ab2 100644 --- a/manifest-installer.tmpl +++ b/manifest-installer.tmpl @@ -10,3 +10,8 @@ manifests: platform: architecture: arm64 os: linux + - + image: rancher/system-agent-installer-rancher:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-{{build.commit}}{{/if}}-linux-s390x + platform: + architecture: s390x + os: linux diff --git a/manifest.tmpl b/manifest.tmpl index f7879740664..4ee64844820 100644 --- a/manifest.tmpl +++ b/manifest.tmpl @@ -10,3 +10,8 @@ manifests: platform: architecture: arm64 os: linux + - + image: rancher/rancher:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-{{build.commit}}{{/if}}-linux-s390x + platform: + architecture: s390x + os: linux diff --git a/package/Dockerfile b/package/Dockerfile index 5d660e8e536..90122719794 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -1,3 +1,17 @@ +ARG K3S_BUILDER=rancher/k3s:v1.22.5-k3s1 + +# Use binaries from k3s root for s390x as k3s is not available on s390x +FROM registry.suse.com/suse/sle15:15.3 AS k3s_root +ARG ARCH +ENV ARCH=${ARCH} +ENV K3S_ROOT_VERSION v0.11.0 +ONBUILD RUN zypper -n in tar +ONBUILD ADD https://github.com/rancher/k3s-root/releases/download/${K3S_ROOT_VERSION}/k3s-root-${ARCH}.tar /k3s-root.tar +ONBUILD RUN tar xvf /k3s-root.tar; \ + touch /bin/cni /bin/containerd /bin/containerd-shim-runc-v2 /bin/runc + +FROM ${K3S_BUILDER} as k3s_builder + FROM registry.suse.com/suse/sle15:15.3 RUN zypper -n install git-core curl ca-certificates unzip xz gzip sed tar shadow gawk vim && \ @@ -31,16 +45,16 @@ ENV CATTLE_K3S_VERSION v1.22.5+k3s1 ENV CATTLE_MACHINE_VERSION v0.15.0-rancher73 ENV CATTLE_MACHINE_PROVISION_IMAGE rancher/machine:${CATTLE_MACHINE_VERSION} ENV CATTLE_ETCD_VERSION v3.5.1 -ENV LOGLEVEL_VERSION v0.1.3 +ENV LOGLEVEL_VERSION v0.1.4 ENV TINI_VERSION v0.18.0 -ENV TELEMETRY_VERSION v0.5.16 +ENV TELEMETRY_VERSION v0.5.17 ENV DOCKER_MACHINE_LINODE_VERSION v0.1.8 ENV LINODE_UI_DRIVER_VERSION v0.3.0 # make sure the version number is consistent with the one at Line 100 of pkg/data/management/machinedriver_data.go ENV DOCKER_MACHINE_HARVESTER_VERSION v0.3.4 ENV CATTLE_KDM_BRANCH ${CATTLE_KDM_BRANCH} ENV HELM_VERSION v3.7.1 -ENV KUSTOMIZE_VERSION v3.10.0 +ENV KUSTOMIZE_VERSION v4.4.1 ENV CATTLE_SYSTEM_AGENT_VERSION v0.1.1 ENV CATTLE_SYSTEM_AGENT_UPGRADE_IMAGE rancher/system-agent:${CATTLE_SYSTEM_AGENT_VERSION}-suc ENV CATTLE_SYSTEM_UPGRADE_CONTROLLER_CHART_VERSION 100.0.1+up0.3.1 @@ -73,6 +87,7 @@ RUN curl -LO https://releases.rancher.com/harvester-node-driver/${DOCKER_MACHINE ENV TINI_URL_amd64=https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini \ TINI_URL_arm64=https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-arm64 \ + TINI_URL_s390x=https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-s390x \ TINI_URL=TINI_URL_${ARCH} ENV HELM_URL_V2_amd64=https://github.com/rancher/helm/releases/download/${CATTLE_HELM_VERSION}/rancher-helm \ @@ -87,12 +102,13 @@ ENV HELM_URL_V2_amd64=https://github.com/rancher/helm/releases/download/${CATTLE RUN curl -sLf ${KUSTOMIZE_URL} | tar -xzf - -C /usr/bin -# set up helm 2 -RUN curl -sLf ${!HELM_URL_V2} > /usr/bin/rancher-helm && \ - curl -sLf ${!TILLER_URL} > /usr/bin/rancher-tiller && \ - ln -s /usr/bin/rancher-helm /usr/bin/helm && \ - ln -s /usr/bin/rancher-tiller /usr/bin/tiller && \ - chmod +x /usr/bin/rancher-helm /usr/bin/rancher-tiller +RUN if [ "${ARCH}" != "s390x" ]; then \ + curl -sLf ${!HELM_URL_V2} > /usr/bin/rancher-helm && \ + curl -sLf ${!TILLER_URL} > /usr/bin/rancher-tiller && \ + ln -s /usr/bin/rancher-helm /usr/bin/helm && \ + ln -s /usr/bin/rancher-tiller /usr/bin/tiller && \ + chmod +x /usr/bin/rancher-helm /usr/bin/rancher-tiller; \ + fi # set up helm 3 RUN curl ${HELM_URL_V3} | tar xvzf - --strip-components=1 -C /usr/bin && \ @@ -100,7 +116,7 @@ RUN curl ${HELM_URL_V3} | tar xvzf - --strip-components=1 -C /usr/bin && \ chmod +x /usr/bin/kustomize # Set up K3s: copy the necessary binaries from the K3s image. -COPY --from=rancher/k3s:v1.22.5-k3s1 \ +COPY --from=k3s_builder \ /bin/blkid \ /bin/charon \ /bin/cni \ @@ -180,6 +196,7 @@ RUN mkdir -p /usr/share/rancher/ui && \ curl -sfL https://github.com/rancher/system-agent/releases/download/${CATTLE_SYSTEM_AGENT_VERSION}/rancher-system-agent-arm -O && \ curl -sfL https://github.com/rancher/system-agent/releases/download/${CATTLE_SYSTEM_AGENT_VERSION}/rancher-system-agent-arm64 -O && \ curl -sfL https://github.com/rancher/system-agent/releases/download/${CATTLE_SYSTEM_AGENT_VERSION}/rancher-system-agent-amd64 -O && \ + curl -sfL https://github.com/rancher/system-agent/releases/download/${CATTLE_SYSTEM_AGENT_VERSION}/rancher-system-agent-s390x -O && \ curl -sfL https://github.com/rancher/system-agent/releases/download/${CATTLE_SYSTEM_AGENT_VERSION}/install.sh -o system-agent-install.sh && \ curl -sfL https://raw.githubusercontent.com/rancher/rke2/master/windows/rke2-install.ps1 -o rke2-install.ps1 diff --git a/package/Dockerfile.agent b/package/Dockerfile.agent index 5244f12c438..ad12560a64e 100644 --- a/package/Dockerfile.agent +++ b/package/Dockerfile.agent @@ -12,7 +12,7 @@ RUN zypper -n install --no-recommends curl ca-certificates jq git-core hostname curl -sLf https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl > /usr/bin/kubectl && \ chmod +x /usr/bin/kubectl -ENV LOGLEVEL_VERSION v0.1.3 +ENV LOGLEVEL_VERSION v0.1.4 RUN curl -sLf https://github.com/rancher/loglevel/releases/download/${LOGLEVEL_VERSION}/loglevel-${ARCH}-${LOGLEVEL_VERSION}.tar.gz | tar xvzf - -C /usr/bin diff --git a/package/jailer.sh b/package/jailer.sh index df4787400a9..4dbb8103a9c 100755 --- a/package/jailer.sh +++ b/package/jailer.sh @@ -58,13 +58,17 @@ cp -r -l /opt/drivers/management-state/bin /opt/jail/$NAME/var/lib/rancher/manag cp -l /usr/bin/rancher-machine /opt/jail/$NAME/usr/bin # Hard link helm_2 into the jail -cp -l /usr/bin/rancher-helm /opt/jail/$NAME/usr/bin +if [[ -f /usr/bin/rancher-helm ]]; then + cp -l /usr/bin/rancher-helm /opt/jail/$NAME/usr/bin +fi # Hard link helm_3 into the jail cp -l /usr/bin/helm_v3 /opt/jail/$NAME/usr/bin # Hard link tiller into the jail -cp -l /usr/bin/rancher-tiller /opt/jail/$NAME/usr/bin +if [[ -f /usr/bin/rancher-tiler ]]; then + cp -l /usr/bin/rancher-tiller /opt/jail/$NAME/usr/bin +fi # Hard link kustomize into the jail cp -l /usr/bin/kustomize /opt/jail/$NAME/usr/bin diff --git a/pkg/settings/setting.go b/pkg/settings/setting.go index 79e9d511e90..4d2f6f55d24 100644 --- a/pkg/settings/setting.go +++ b/pkg/settings/setting.go @@ -108,7 +108,7 @@ var ( PartnerChartDefaultBranch = NewSetting("partner-chart-default-branch", "main") RKE2ChartDefaultBranch = NewSetting("rke2-chart-default-branch", "main") FleetDefaultWorkspaceName = NewSetting("fleet-default-workspace-name", fleetconst.ClustersDefaultNamespace) // fleetWorkspaceName to assign to clusters with none - ShellImage = NewSetting("shell-image", "rancher/shell:v0.1.14") + ShellImage = NewSetting("shell-image", "rancher/shell:v0.1.15") IgnoreNodeName = NewSetting("ignore-node-name", "") // nodes to ignore when syncing v1.node to v3.node NoDefaultAdmin = NewSetting("no-default-admin", "") RestrictedDefaultAdmin = NewSetting("restricted-default-admin", "false") // When bootstrapping the admin for the first time, give them the global role restricted-admin diff --git a/scripts/chart/test b/scripts/chart/test index 09cf1381d7b..5e21294ba2e 100755 --- a/scripts/chart/test +++ b/scripts/chart/test @@ -2,6 +2,11 @@ echo "-- chart/test --" +# skipping tests for s390x since helm v2 doesn't support s390x yet +if [ ${ARCH} == s390x ]; then + exit 0 +fi + # Check for helm if [ -z "$(type -p helm)" ]; then echo "helm not found. Helm is required to run tests." diff --git a/scripts/package b/scripts/package index 7b25f3db710..a8e7cc4705a 100755 --- a/scripts/package +++ b/scripts/package @@ -38,8 +38,14 @@ SYSTEM_AGENT_INSTALLER_K3S_IMAGES=( "${K3S_RELEASE_TAGS[@]/#/${REPO}/system-agen if [ ${ARCH} == arm64 ]; then sed -i -e '$a\' -e 'ENV ETCD_UNSUPPORTED_ARCH=arm64' Dockerfile fi - -docker build --build-arg VERSION=${TAG} --build-arg ARCH=${ARCH} --build-arg IMAGE_REPO=${REPO} --build-arg SYSTEM_CHART_DEFAULT_BRANCH=${SYSTEM_CHART_DEFAULT_BRANCH} --build-arg CHART_DEFAULT_BRANCH=${CHART_DEFAULT_BRANCH} -t ${IMAGE} . +if [ ${ARCH} == s390x ]; then + sed -i -e '$a\' -e 'ENV ETCD_UNSUPPORTED_ARCH=s390x' Dockerfile + # Use k3s root binaries for s390x as k3s is not available + K3S_BUILDER=k3s_root + docker build --build-arg VERSION=${TAG} --build-arg ARCH=${ARCH} --build-arg IMAGE_REPO=${REPO} --build-arg SYSTEM_CHART_DEFAULT_BRANCH=${SYSTEM_CHART_DEFAULT_BRANCH} --build-arg CHART_DEFAULT_BRANCH=${CHART_DEFAULT_BRANCH} --build-arg K3S_BUILDER=${K3S_BUILDER} -t ${IMAGE} . +else + docker build --build-arg VERSION=${TAG} --build-arg ARCH=${ARCH} --build-arg IMAGE_REPO=${REPO} --build-arg SYSTEM_CHART_DEFAULT_BRANCH=${SYSTEM_CHART_DEFAULT_BRANCH} --build-arg CHART_DEFAULT_BRANCH=${CHART_DEFAULT_BRANCH} -t ${IMAGE} . +fi docker build --build-arg VERSION=${TAG} --build-arg ARCH=${ARCH} --build-arg RANCHER_TAG=${TAG} --build-arg RANCHER_REPO=${REPO} -t ${AGENT_IMAGE} -f Dockerfile.agent . if [ "${ARCH}" == amd64 ]; then diff --git a/scripts/test b/scripts/test index 3018177a9ad..920267e4b53 100755 --- a/scripts/test +++ b/scripts/test @@ -15,13 +15,18 @@ cleanup() return $EXIT } +# skipping tests for s390x since k3s doesn't support s390x yet +if [ ${ARCH} == s390x ]; then + exit 0 +fi + cd $(dirname $0)/.. #[ "${ARCH}" == "amd64" ] && RACE=-race go test -cover -tags=test ./pkg/... -if [ ${ARCH} == arm64 ]; then - export ETCD_UNSUPPORTED_ARCH=arm64 +if [ ${ARCH} == arm64 ] || [ ${ARCH} == s390x ]; then + export ETCD_UNSUPPORTED_ARCH=${ARCH} fi echo Starting rancher server for test