Created
August 16, 2020 18:06
-
-
Save tonysm/da8e1d45cf85ad8263465bf16b4ffc8c to your computer and use it in GitHub Desktop.
Commiting changes and sending a Pull Request to the infrastructure repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuring Git | |
git config --global credential.helper store | |
echo "https://${GITHUB_TOKEN}:[email protected]" > "${HOME}/.git-credentials" | |
hub config --global hub.protocol https | |
hub config --global user.name "${GITHUB_NAME}" | |
hub config --global user.email "${GIT_EMAIL}" | |
# Cloning the infrastructure repository | |
hub clone ${GIT_REPO} infrastructure-repo | |
cd infrastructure-repo | |
# Create a new branch for the release | |
git checkout -b release-${RELEASE_VERSION} | |
# Patch the new version using kustomize | |
kustomize edit set image laravel-app-php=tonysm/docker4laravelapp-php:${RELEASE_VERSION} | |
kustomize edit set image laravel-app-nginx=tonysm/docker4laravelapp-nginx:${RELEASE_VERSION} | |
# Adds the kustomization file to git stage | |
hub add kustomization.yml | |
hub commit -F- <<EOF | |
Auto-release of the image version | |
This commit updates the application container image version to: ${RELEASE_VERSION} | |
EOF | |
# Create the PR in the infrastructure repository | |
hub pull-request -p -m "Auto-release of image version: ${RELEASE_VERSION}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment