Git Code Promotion

Home

It turned out that git presented far more of a problem for the team than was even expected. This was made to offer a little guidance of what it takes to do a full code promotion from code update in dev to Release in AWS. This ended up saving the team a lot of time and aggrevation.



Note that in PowerShell, comments begin with the hash symbol '#'.

Note that names are not completely consistent:
(AWS) dev = (git) develop.
(AWS) test = (git) master = QA.
(AWS) prod = (git) release.

Promoting a change in IPD from Code change to AWS Prod

# Check where you are in the git branches and what current changes are pending.
# It should show the files that were changed. Presumabley this is the develop branch where the developer
# has made their code changes that they want to promote.
# Start this process in the root folder of the project that is to be promoted.
# First though, run the OKTAAWSCLI.bat file for dev.

PS>git status

# If not in the develop branch, change to that branch.
PS>git checkout develop

# Start by doing a pull ... ALWAYS.
PS>git pull

# Add the changed files (stage them) to the local repository.
PS> git add -A

# Commit the changed files to the local repository. (-m is used to add a required log message.)
PS> git commit -m "This is the commit message"

# Add the changed files from local repository to remote repository.
PS> git push -u origin develop - [branch name]

# The changed files have now been committed to the local and remote develop Repositories.
# Deploy the project to dev AWS using the script in the PowerShell command file.

PS> .\deploy-bsh-cloudpub.ps1

# The code change should now be in the develop branch of the local and remote. repositories as well as deployed to the AWS dev environment.
# If this is CloudPub, check the corrpub-d.CORR.AwsApplicationLog to make sure that it is sending log messages.


# Run the OKTAAWSCLI.bat file for test.
# Change to the master branch.
PS>git checkout master
# Pull before push.
PS> git pull
# Move the changes in the develop branch to the local master branch.
PS> git merge develop
# Move the changes copied from the develop branch to the remote master branch.
PS> git push -u origin master

# The changed files have now been committed to the local and remote master Repositories.
# Deploy the project to test AWS using the script in the PowerShell command file.

PS> .\deploy-bsh-cloudpub.ps1

# The code change should now be in the master branch of the local and remote repositories as well as deployed to the AWS test environment.
# If this is CloudPub, check the corrpub-s.CORR.AwsApplicationLog to make sure that it is sending log messages.


# Run the OKTAAWSCLI.bat file for release.
# Change to the release branch.
PS>git checkout release
# Pull before push.
PS> git pull
# Move the changes in the master branch to the local release branch.
PS> git merge master
# Move the changes copied from the master branch to the remote release branch.

# Update version comment @633 NIA BusinessUnitServices.cs.
PS> git push -u origin release

# The changed files have now been committed to the local and remote release Repositories.
# Deploy the project to release AWS using the script in the PowerShell command file.

PS> .\deploy-bsh-cloudpub.ps1

# The code change should now be in the release branch of the local and remote repositories as well as deployed to the AWS prod environment.
# If this is CloudPub, check the corrpub-p.CORR.AwsApplicationLog to make sure that it is sending log messages.