ci: verify .circleci/config.yml is up to date

This commit is contained in:
Mahmood Ali 2019-11-22 14:50:49 -05:00
parent 57ff36df5c
commit 500fb6f8ce
3 changed files with 41 additions and 0 deletions

6
.circleci/config.yml generated
View file

@ -424,12 +424,18 @@ jobs:
sudo rm -rf /usr/bin/protoc
sudo ./scripts/vagrant-linux-priv-protoc.sh
name: install protoc
- run:
command: "CCI_VERSION=\"0.1.5879\"\nCCI_SHA256=\"f178ea62c781aec06267017404f87983c87f171fd0e66ef3737916246ae66dd6\"\n\nURL=\"https://github.com/CircleCI-Public/circleci-cli/releases/download/v${CCI_VERSION}/circleci-cli_${CCI_VERSION}_linux_amd64.tar.gz\"\n\nmkdir -p /tmp/circleci-cli/\ncurl --fail --show-error --location \\\n -o /tmp/circleci-cli/cli.tar.gz \"${URL}\"\n\necho \"$CCI_SHA256 /tmp/circleci-cli/cli.tar.gz\" | sha256sum -c\n\ntar -xz --strip-components=1 \\\n -C /tmp/circleci-cli \\\n -f /tmp/circleci-cli/cli.tar.gz \\\n \"circleci-cli_${CCI_VERSION}_linux_amd64/circleci\" \n\nsudo cp /tmp/circleci-cli/circleci /usr/bin/circleci-local-cli\n\ncircleci-local-cli version\n"
name: Install CircleCI CLI 0.1.5879
- run:
command: make deps lint-deps
- run:
command: make check
- run:
command: make checkscripts
- run:
command: make -C .circleci CIRCLECI="circleci-local-cli --skip-update-check" ci-verify
name: check .circleci/config.yml is up-to-date
environment:
- GIT_PAGER: cat
- GOMAXPROCS: 1

View file

@ -0,0 +1,31 @@
parameters:
version:
type: string
default: 0.1.5879
sha256:
type: string
default: f178ea62c781aec06267017404f87983c87f171fd0e66ef3737916246ae66dd6
steps:
- run:
name: Install CircleCI CLI << parameters.version >>
command: |
CCI_VERSION="<< parameters.version >>"
CCI_SHA256="<< parameters.sha256 >>"
URL="https://github.com/CircleCI-Public/circleci-cli/releases/download/v${CCI_VERSION}/circleci-cli_${CCI_VERSION}_linux_amd64.tar.gz"
mkdir -p /tmp/circleci-cli/
curl --fail --show-error --location \
-o /tmp/circleci-cli/cli.tar.gz "${URL}"
echo "$CCI_SHA256 /tmp/circleci-cli/cli.tar.gz" | sha256sum -c
tar -xz --strip-components=1 \
-C /tmp/circleci-cli \
-f /tmp/circleci-cli/cli.tar.gz \
"circleci-cli_${CCI_VERSION}_linux_amd64/circleci"
sudo cp /tmp/circleci-cli/circleci /usr/bin/circleci-local-cli
circleci-local-cli version

View file

@ -3,6 +3,10 @@ steps:
- checkout
- run: apt-get update; apt-get install -y shellcheck sudo unzip
- install-protoc
- install-circleci-local-cli
- run: make deps lint-deps
- run: make check
- run: make checkscripts
- run:
name: check .circleci/config.yml is up-to-date
command: make -C .circleci CIRCLECI="circleci-local-cli --skip-update-check" ci-verify