Created
February 20, 2024 13:03
-
-
Save arfar-x/148422073e8cb5e4a42b5b07f5b169ed to your computer and use it in GitHub Desktop.
Gitlab CI snippet
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
| before_script: | |
| - | | |
| # Validate repo's Git credentials. | |
| git config user.email "$GITLAB_USER_EMAIL" | |
| git config user.name "$GITLAB_USER_NAME" | |
| git config credential.helper "store --file=.git/credentials" | |
| git config http.sslverify "false" | |
| .commit_version: &commit_version | |
| - git remote set-url origin https://${GITLAB_USER_LOGIN}:${ACCESS_KEY}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git | |
| - git checkout $CI_COMMIT_REF_NAME | |
| - git add . | |
| - git commit -m "Versioned $MODULE_VERSION pipeline $CI_PIPELINE_ID" | |
| - git push origin $CI_COMMIT_REF_NAME -o ci.skip | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment