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

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

Open
a-t-0 opened this issue Oct 15, 2022 · 0 comments
Milestone

Comments

@a-t-0
Copy link
Member

a-t-0 commented Oct 15, 2022

  • 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
@a-t-0 a-t-0 added this to the Efficiency milestone Oct 15, 2022
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

1 participant