Skip to content

migratePhases=true mode does not seem to recognize PHASEFILE and SERVERAPIPASS variables #7

Open
@jam3sk

Description

@jam3sk

Issue Type

  • Bug Report

Script Name

migrate_bitbucket_server_to_bitbucket_cloud - migrate.sh

Bitbucket Server Version

Paste verbatim output from Bitbucket Server Version between quotes below

Atlassian Bitbucket v5.1.0

OS / Environment

Red Hat Enterprise Linux Server 7.5

Summary & Steps to Reproduce

Your script is a lifesaver!!! I appreciate all the effort that went into this. However, I'm having some issues with a phased migration.

When attempting to run the migrate.sh script with migratePhases=true, two issues present themselves:

  1. The filename specified in the PHASEFILE variable does not work. Instead, I have to edit the phase1.txt file. This is no big deal in practice, but I'm not sure why it's the case. Here's what I am using:
# Migration can be done in one of three ways:
# Using Function migrateALL, will migrate ALL Projects and ALL Repos found on Bitbucket Server
migrateALL=false

# OR using Function migratePhases which is a plain text file containing a list of
# Project Keys and Repo Slugs separated by a TAB in the text file set in variable PHASEFILE
# This was designed to use values pasted from a spreadsheet with one or more rows containing projects and repo slugs
migratePhases=true
PHASEFILE="mob-repos.txt"
PHASENUMBER="1"

...still wants to use phase1.txt.

  1. I am prompted for a password for each repo and branch during the # Git Checkout, Git Pull, Git Fetch on every branch in the repo stage. I have the following set:
# Username and password for Bitbucket Server account with Admin or System Admin level permissions on your Bitbucket Server
# This user must be able to read all Projects and all Repos in order to backup & migrate the entire server to cloud
SERVERAPIUSER="migration-user"
SERVERAPIPASS="migration-password"

I am not prompted for a password when running migrateALL=true. This obviously presents a much more cumbersome issue. I am trying to find the root cause in the script, but it's a bit over my head.

Any help is appreciated!!!

Expected Results

migratePhases=true mode recognizes PHASEFILE and SERVERAPIPASS variables

Actual Results

migratePhases=true mode does not recognize PHASEFILE and SERVERAPIPASS variables


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions