0
我试图处理kubernetes(openshift起源)autodeploy。下面是ci-config。gitlab自动部署到kubernetes/openshift:错误:不匹配“:master”
据我了解CI应该得到的代码,检查dockerfile,如果它不存在(它不是) - 建立herokuish容器并推送到kubernetes。但是,我得到一个错误:
$ 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:
# 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.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
我在做什么错?是否应该在openshift中额外设置一些内容?