Created
September 10, 2020 19:23
-
-
Save sagarpanda/52ca10890af8b7f829a43dd24a9dabe5 to your computer and use it in GitHub Desktop.
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
| variables: | |
| GIT_USER_NAME: "Build Bot" | |
| GIT_USER_EMAIL: "[email protected]" | |
| GIT_REPO_URL: "[email protected]:username/repo_name.git" | |
| CI_PROJECT_ID: "1002" | |
| CI_JOB_TOKEN: $GH_TOKEN | |
| GL_TOKEN: $GH_TOKEN | |
| GL_SSH_KNOWN_HOSTS: $SSH_HOST_KEY | |
| GL_SSH_PRIVATE_KEY: $SSH_PRIVATE_KEY | |
| version_alpha: | |
| image: node:latest | |
| stage: deploy | |
| only: | |
| variables: | |
| - $CI_COMMIT_REF_NAME =~ /^feature\/(.*)/ | |
| script: | |
| - ls -alt | |
| - mkdir -p /root/.ssh | |
| - echo "${GL_SSH_KNOWN_HOSTS}" > /root/.ssh/known_hosts | |
| - echo "${GL_SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa | |
| - chmod 600 /root/.ssh/id_rsa | |
| - git config user.name "$GIT_USER_NAME" | |
| - git config user.email "$GIT_USER_EMAIL" | |
| - git remote set-url origin "$GIT_REPO_URL" > /dev/null 2>&1 | |
| - git checkout ${CI_COMMIT_REF_NAME} | |
| - yarn | |
| - yarn lerna version --conventional-prerelease --preid alpha --create-release gitlab --yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment