summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-08-04 21:26:33 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-08-05 17:28:10 +0200
commit3d245660c53da4b4da832c3139329e091dbfac3d (patch)
tree3d0b60a1bba55a7786ccf49f261077894c74c5c0
parent7f70b906e8e1aa18d0b9addf2ad009d5da5c3218 (diff)
Updated .gitlab-ci.yaml to create a release archive
-rw-r--r--.gitlab-ci.yml13
-rwxr-xr-xdeploy.sh2
2 files changed, 13 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9fed9ea0..b5bdba41 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -51,7 +51,7 @@ before_script:
.test_template: &test_definition
stage: test
artifacts:
- name: "${CI_JOB_NAME}_${CI_PROJECT_ID}"
+ name: "${CI_JOB_NAME}_${CI_JOB_ID}"
expire_in: 1 week
paths:
- ./coverage/
@@ -91,6 +91,17 @@ test:7.1:
composer --no-ansi install --no-dev
composer --no-ansi dump-autoload --optimize
+build_release_file:
+ <<: *deploy_definition
+ artifacts:
+ name: "release_${CI_COMMIT_REF_SLUG}_${CI_JOB_ID}_${CI_COMMIT_SHA}"
+ expire_in: 1 week
+ paths:
+ - ./release/
+ script:
+ - *deployment_dependencies
+ - rsync -vAax --exclude '.git*' --exclude .composer/ --exclude coverage/ --exclude node_modules/ --exclude release/ ./ release/
+
deploy_staging:
<<: *deploy_definition
environment:
diff --git a/deploy.sh b/deploy.sh
index 9aa72ff5..b731e36a 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -50,7 +50,7 @@ fi
echo "syncing ${PWD}/ to ${remote_host}:${remote_path}/${deploy_id}/"
-rsync -vAax --exclude '.git*' --exclude .composer/ --exclude node_modules/ \
+rsync -vAax --exclude '.git*' --exclude .composer/ --exclude coverage/ --exclude node_modules/ \
-e "ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" \
./ "${remote_host}:${remote_path}/${deploy_id}/"