Skip to content

Wait untill repository is deleted, instead of hardcoded 30 seconds per commit. #127

Description

@a-t-0
  • Fix: in: create_empty_gitlab_repository_v0:
# If it already exists, delete the repository
    delete_existing_repository "$gitlab_repo_name" "$gitlab_username"
    sleep 30
    # TODO: replace this with a while loop that waits until the repo is deleted.

    # Verify the repository is deleted.
    if [ "$(gitlab_mirror_repo_exists_in_gitlab "$gitlab_repo_name")" == "FOUND" ]; then
      # Throw an error if it is not deleted.
      echo "The GitLab repository was supposed to be deleted, yet it still exists."
      #exit 177
    fi
  fi
  • Fix: in same method, wating until repo is created:
# Create repository.
  curl -H "Content-Type:application/json" "$GITLAB_SERVER_HTTP_URL/api/v4/projects?private_token=$personal_access_token" -d "{ \"name\": \"$gitlab_repo_name\" }" > /dev/null 2>&1 &
  sleep 30

  # Verify the repository is created.
  if [ "$(gitlab_mirror_repo_exists_in_gitlab "$gitlab_repo_name")" != "FOUND" ]; then
    # Throw an error if it is not created succesfully.
    echo "The GitLab repository was supposed to be created, yet it does not yet exists."
    exit 178
  fi

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions