It’s been 5 days I am struggling with this error, need help.
I am trying to install bufbuild in one of my step in a job but no output
anchor_for_install_buf: &install_buf
name: Download latest buf
command: >
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases" |
grep '"tag_name":' |
sed -E 's/.*"([^"]+)".*/\1/'
}
BUFBUILD=$(get_latest_release bufbuild/buf)
BUFVERSION=${BUFBUILD%%[[:space:]]*}
echo Using Bufbuild version $BUFVERSION
curl -sSLO
https://github.com/bufbuild/buf/releases/download/$BUFVERSION/buf-Linux-x86_64 > ~/buf
chmod a+x ~/buf
sudo mv ~/buf /usr/local/bin
docker image
var_for_docker_image: &docker_image circleci/android:api-28
job default
anchor_for_job_defaults: &job_defaults
working_directory: ~/repo
environment:
JVM_OPTS: -Xmx3200m
TERM: dumb
docker:
- image: *docker_image
linters Job - Error here, buf command not found
version: 2
jobs:
linters:
<<: *job_defaults
steps:
- checkout
- run:
<<: *install_buf
- run:
name: Buf check - proto files
command: buf --version
workflow
workflows:
version: 2
circleci_tests:
jobs:
- linters
Running local CircleCi, But no output
Using Bufbuild version v0.15.0
====>> BufBuild check proto files
#!/bin/bash -eo pipefail
buf --version
Success!