Hello,
We’re using the finc/kustomize orb on several projects. I’m trying to setup a new project using this orb. Here is the circleCI config:
version: 2.1
orbs:
docker: circleci/docker@2.1.2
k8s: digitalocean/k8s@0.1.1
kubernetes: circleci/kubernetes@1.3.0
kustomize: finc/kustomize@0.0.2
commands:
deploy:
description: "deliver application to kubernetes cluster"
parameters:
image:
type: string
default: "gathertown/interview-exercise"
cluster:
type: string
default: abcd
steps:
- checkout
- kubernetes/install-kubectl
- k8s/install
- k8s/initialize:
cluster: << parameters.cluster >>
- kustomize/install:
version: "v4.4.0"
[...]
The kustomize
installation always fails with the same error:
#!/bin/bash -eo pipefail
URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.7/kustomize_v4.5.7_linux_amd64.tar.gz
curl -L $URL | tar zx
[ -w /usr/local/bin ] && SUDO="" || SUDO=sudo
$SUDO chmod +x ./kustomize
$SUDO mv ./kustomize /usr/local/bin
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 5622k 100 5622k 0 0 30.0M 0 --:--:-- --:--:-- --:--:-- 30.0M
tar: kustomize: Cannot open: File exists
tar: Exiting with failure status due to previous errors
Exited with code exit status 2
CircleCI received exit code 2
Now if I ssh
to the builder and run the script myself the app is installed just fine:
bash f.sh
+ URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.7/kustomize_v4.5.7_linux_amd64.tar.gz
+ curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.7/kustomize_v4.5.7_linux_amd64.tar.gz
+ tar zx
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 5622k 100 5622k 0 0 30.1M 0 --:--:-- --:--:-- --:--:-- 30.1M
+ '[' -w /usr/local/bin ']'
+ SUDO=sudo
+ sudo chmod +x ./kustomize
+ sudo mv ./kustomize /usr/local/bin
$ ls /usr/local/bin/kustomize
/usr/local/bin/kustomize
Any ideas what’s happening?!