Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Mak/fix stg #409

Merged
merged 8 commits into from
Feb 16, 2023
Merged

Mak/fix stg #409

merged 8 commits into from
Feb 16, 2023

Conversation

mordamax
Copy link
Contributor

@mordamax mordamax commented Feb 7, 2023

@mordamax mordamax requested review from paritytech-ci and a team and removed request for paritytech-ci February 9, 2023 22:03
@mordamax mordamax marked this pull request as ready for review February 9, 2023 22:03
@mordamax mordamax requested review from a team and joao-paulo-parity as code owners February 9, 2023 22:03
# remember initial branch
dev_branch=$(git rev-parse --abbrev-ref HEAD)

# replace possible "/" with "-"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you include a comment why it is done? Gitlab does not like / in branch names?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not because of gitlab. The reason is docker. It uses git tag for tagging the image so if there's a / symbol docker thinks that it's actually a path. but not part of the tag name.

deploy-stg.sh Outdated
stg_branch="stg-v0.0.${timestamp}-${dev_branch_sanitized}"

git checkout -b "$stg_branch"
git push origin "$stg_branch"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider doing:

git push origin HEAD:"$stg_branch"

Then you could simplify the script by removing the git checkouts because a local branch is not needed then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't know that!

@mordamax mordamax requested review from rzadp and Bullrich February 15, 2023 16:15
deploy-stg.sh Outdated
git push origin --delete "$stg_branch"

# get back to initial branch
git checkout "$dev_branch"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, thanks!

@mordamax mordamax merged commit 228942a into master Feb 16, 2023
@mordamax mordamax deleted the mak/fix-stg branch February 16, 2023 12:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants