Skip to content
Snippets Groups Projects
Commit 5b880a1f authored by Santiago Rafael Gonzalez Pereyra's avatar Santiago Rafael Gonzalez Pereyra
Browse files

.gitlab-ci.yml added (test)

parent fdf16ba5
No related branches found
No related tags found
1 merge request!1WIP: API requests refactor
...@@ -13,20 +13,24 @@ deploy to preview: ...@@ -13,20 +13,24 @@ deploy to preview:
environment: environment:
name: preview name: preview
script: script:
- echo $ENV_PREVIEW_FILE | base64 -d >> ./.env - echo "" >> ./.env
- echo $ENV_PREVIEW_FILE | base64 -di >> ./.env
- set -o allexport; source .env; set +o allexport - set -o allexport; source .env; set +o allexport
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null - echo "$SSH_PRIVATE_KEY" | base64 -di > sshkey
- echo "" >> sshkey
- cat sshkey | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- chmod 700 ~/.ssh - chmod 700 ~/.ssh
- echo "$PRIVATE_HOST_KEY" | base64 -d > ~/.ssh/known_hosts - echo "$PRIVATE_HOST_KEY" | base64 -di > ~/.ssh/known_hosts
- npm i - npm i
- echo "APP_VERSION=$CI_COMMIT_TAG" >> ./.env - echo "APP_VERSION=$CI_COMMIT_TAG" >> ./.env
- npm run build - npm run build
- ssh openfing@openfing.fing.edu.uy 'rm -rf ~/openfing/preview; mkdir ~/openfing/preview' - ssh openfing@openfing.fing.edu.uy 'rm -rf ~/openfing/preview; mkdir ~/openfing/preview'
- scp -r ./build/* openfing@openfing.fing.edu.uy:~/openfing/preview - scp -r ./dist/* openfing@openfing.fing.edu.uy:~/openfing/preview
only: only:
- /^v\d+\.\d+\.\d+-preview\d+$/ - /^v\d+\.\d+\.\d+-preview\d+$/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment