Hello everyone,
Since today I receive a new message coming from a workflow using kubernetes orb, the error is this one:
Error loading config file “/home/circleci/.kube/config”: yaml: line 6: could not find expected ‘:’
The problem is that the config file worked before, and it doesn’t work anymore. Is there any issue or anything going on with CircleCI ?
Here is the config.yaml:
version: 2.1
orbs:
kubernetes: circleci/kubernetes@1.3.0
jobs:
build_and_test:
docker:
- image: circleci/node:lts
steps:
- setup_remote_docker:
version: 20.10.6
docker_layer_caching: true
- checkout
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: ci/build.sh
- run: ci/test.sh
build_test_and_push:
docker:
- image: circleci/node:lts
steps:
- setup_remote_docker:
version: 20.10.6
docker_layer_caching: true
- checkout
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: ci/build.sh
- run: ci/test.sh
- run: ci/push.sh $CIRCLE_SHA1
- run: ci/push.sh $CIRCLE_BRANCH
update_k8s_image:
parameters:
namespace:
type: string
default: none
ref:
type: string
default: none
docker:
- image: 'cimg/base:stable'
steps:
- checkout
- kubernetes/install-kubeconfig
- kubernetes/install-kubectl
- kubernetes/update-container-image:
namespace: << parameters.namespace >>
container-image-updates: 'anyproject-backend=here_a_dockerhub_repo/${CIRCLE_PROJECT_REPONAME}:<< parameters.ref >>'
get-rollout-status: true
resource-name: deployment/anyproject-backend
- kubernetes/update-container-image:
namespace: << parameters.namespace >>
container-image-updates: 'anyproject-celery-worker=here_a_dockerhub_repo/${CIRCLE_PROJECT_REPONAME}:<< parameters.ref >>'
get-rollout-status: true
resource-name: deployment/anyproject-celery-worker
- kubernetes/update-container-image:
namespace: << parameters.namespace >>
container-image-updates: 'anyproject-celery-beat=here_a_dockerhub_repo/${CIRCLE_PROJECT_REPONAME}:<< parameters.ref >>'
get-rollout-status: true
resource-name: deployment/anyproject-celery-beat
release:
docker:
- image: circleci/node:lts
steps:
- setup_remote_docker:
version: 20.10.6
docker_layer_caching: true
- checkout
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: ci/build.sh
- run: ci/test.sh
- run: ci/push.sh $CIRCLE_SHA1
- run: ci/release.sh $CIRCLE_SHA1
deploy_preprod:
docker:
- image: circleci/node:lts
environment:
- ENVIRONMENT: "preprod"
steps:
- setup_remote_docker
- checkout
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: ci/deploy.sh anyserver-ip $CIRCLE_TAG
- run:
command: ci/cleanup-prd.sh
when: always
deploy_prd:
docker:
- image: circleci/node:lts
environment:
- ENVIRONMENT: "prd"
steps:
- setup_remote_docker
- checkout
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: ci/deploy.sh anyserver-ip $CIRCLE_TAG
- run:
command: ci/cleanup-prd.sh
when: always
workflows:
version: 2
pull_request:
jobs:
- build_and_test:
context: org-global
filters:
branches:
ignore:
- master
dev_branch:
jobs:
- build_test_and_push:
context: org-global
filters:
branches:
only:
- master
- update_k8s_image:
context: org-global
namespace: project-anyproject-dev
ref: $CIRCLE_SHA1
requires:
- build_test_and_push
filters:
branches:
only:
- master
tagged:
jobs:
- release:
context: org-global
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
- update_k8s_image:
context: org-global
namespace: project-anyproject-uat
ref: $CIRCLE_TAG
requires:
- release
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
- deploy_preprod:
context: org-global
requires:
- release
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
- hold:
type: approval
requires:
- update_k8s_image
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
- deploy_prd:
context: org-global
requires:
- hold
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/