Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab CI/CD Issue #123

Open
synetalsolutions opened this issue May 25, 2022 · 2 comments
Open

GitLab CI/CD Issue #123

synetalsolutions opened this issue May 25, 2022 · 2 comments

Comments

@synetalsolutions
Copy link

synetalsolutions commented May 25, 2022

It was working till yesterday now showing this issues when I try to run pipline.

Positional parameter not supported: registry.gitlab.com/xxx/xxxi/my-build-image:b14d966dd96557cbd0a8dddeeac7568e382d4216
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1

for .gitlab.yml I am using office document of caprover but still this issues comming.

`build-docker-master:
  image: docker:19.03.1
  stage: build
  services:
    - docker:19.03.1-dind
  before_script:
    - export DOCKER_REGISTRY_USER=$CI_REGISTRY_USER # built-in GitLab Registry User
    - export DOCKER_REGISTRY_PASSWORD=$CI_REGISTRY_PASSWORD # built-in GitLab Registry Password
    - export DOCKER_REGISTRY_URL=$CI_REGISTRY # built-in GitLab Registry URL
    - export COMMIT_HASH=$CI_COMMIT_SHA # Your current commit sha
    - export IMAGE_NAME_WITH_REGISTRY_PREFIX=$CI_REGISTRY_IMAGE # Your repository prefixed with GitLab Registry URL
    - docker login -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASSWORD" $DOCKER_REGISTRY_URL # Instructs GitLab to login to its registry

  script:
    - echo "Building..." # MAKE SURE NO SPACE ON EITHER SIDE OF = IN THE FOLLOWING LINE
    - export CONTAINER_FULL_IMAGE_NAME_WITH_TAG=$IMAGE_NAME_WITH_REGISTRY_PREFIX/my-build-image:$COMMIT_HASH
    - docker build -f ./Dockerfile --pull -t built-image-name .
    - docker tag built-image-name "$CONTAINER_FULL_IMAGE_NAME_WITH_TAG"
    - docker push "$CONTAINER_FULL_IMAGE_NAME_WITH_TAG"
    - echo $CONTAINER_FULL_IMAGE_NAME_WITH_TAG
    - echo "Deploying on CapRover..."
    - docker run caprover/cli-caprover:v2.1.1 caprover deploy --caproverUrl $CAPROVER_URL --caproverPassword $CAPROVER_PASSWORD --caproverApp $CAPROVER_APP --imageName $CONTAINER_FULL_IMAGE_NAME_WITH_TAG
  only:
    - master`

I have passed all the variable on the gitlab.

@synetalsolutions synetalsolutions changed the title GitLab CI/CD GitLab CI/CD Issue May 25, 2022
@githubsaturn
Copy link
Collaborator

This is a Gitlab issue. Many potential reasons behind it, see this for example: #85 (comment)

@synetalsolutions
Copy link
Author

synetalsolutions commented May 25, 2022

I got the solutions those who have protected variable and the repository is not protected then it will create this kind of issue if you need to either make repository protected or variable unprotected.

After uncheck on variables its working properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants