gitlab autodeploy to kubernetes/openshift: error: no match for “:master”
I'm trying to handle kubernetes (openshift origin) autodeploy. ci-config is below. As far as I understand CI should get the code, check for a dockerfile, if it is not present (and it is not) — build herokuish container and push it to kubernetes. But I get an error: ``` $ command deploy Generating kubeconfig... Cluster "gitlab-deploy" set. User "gitlab-deploy" set. Context "gitlab-deploy" set. Switched to context "gitlab-deploy". Running on OpenShift. Deleting old application... No resources found Creating application... error: no match for ":master" ``` CI (build step is omitted consciously, it's presence doesn't change anything): ``` # Explanation on the scripts: # https://gitlab.com/gitlab-examples/openshift-deploy/blob/master/README.md image: registry.gitlab.com/gitlab-examples/openshift-deploy services: - mysql:5.7 variables: # Application deployment domain KUBE_DOMAIN: kub.myopenshift.com MYSQL_DATABASE: database MYSQL_ROOT_PASSWORD: secret cache: key: "$CI_BUILD_REF_NAME" untracked: true paths: - vendor/ - .env stages: #- build #- test - review - staging - production - cleanup #build: # stage: build # script: # - composer install --ignore-platform-reqs # - cp .env.testing .env # only: # - branches #test: # stage: test # script: # - php vendor/bin/phpunit --colors # only: # - branches production: stage: production variables: CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME.$KUBE_DOMAIN script: - command deploy environment: name: production url: http://$CI_PROJECT_NAME.$KUBE_DOMAIN when: manual only: - master staging: stage: staging variables: CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-staging.$KUBE_DOMAIN script: - command deploy environment: name: staging url: http://$CI_PROJECT_NAME-staging.$KUBE_DOMAIN only: - master review: stage: review variables: CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN script: - command deploy environment: name: review/$CI_COMMIT_REF_NAME url: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN on_stop: stop_review only: - branches except: - master stop_review: stage: cleanup variables: GIT_STRATEGY: none script: - command destroy environment: name: review/$CI_COMMIT_REF_NAME action: stop when: manual only: - branches except: - master ``` PS very, very little amount of information in docs and tutorials about autodeploy feature :(
issue