-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added handling of previously ignored files + tests.
- Added handling of previously ignored files + tests. - Updated CI config and removed old files. - Fixed `gitAssertNoFilesCommitted` comparing arrays including index.
- Loading branch information
1 parent
d7b7783
commit 965ea7c
Showing
8 changed files
with
186 additions
and
62 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
version: 2 | ||
|
||
aliases: | ||
|
||
- &deploy_ssh_fingerprint "e8:d7:da:b8:6a:fb:75:50:8d:5f:48:61:3c:46:49:50" | ||
|
||
# Shared configuration applied to each job. | ||
- &container_config | ||
working_directory: /app | ||
environment: | ||
|
||
|
||
- &container_config | ||
working_directory: /workspace/code | ||
docker: | ||
- image: integratedexperts/ci-builder | ||
environment: | ||
COMPOSER_ALLOW_SUPERUSER: 1 | ||
DEPLOY_SSH_FINGERPRINT: *deploy_ssh_fingerprint | ||
|
||
- &step_setup_git | ||
run: | | ||
mkdir -p "${HOME}/.ssh/" | ||
echo -e "Host *\n\tStrictHostKeyChecking no\n" > "${HOME}/.ssh/config" | ||
DEPLOY_SSH_FILE="${DEPLOY_SSH_FINGERPRINT//:}" | ||
DEPLOY_SSH_FILE="${HOME}/.ssh/id_rsa_${DEPLOY_SSH_FILE//\"}" | ||
if [ -f "${DEPLOY_SSH_FILE}" ]; then | ||
echo "Found Deploy SSH key file ${DEPLOY_SSH_FILE}" | ||
ssh-add -D > /dev/null | ||
ssh-add "${DEPLOY_SSH_FILE}" | ||
fi | ||
git config --global user.name "$DEPLOY_USER_NAME" | ||
git config --global user.email "$DEPLOY_USER_EMAIL" | ||
jobs: | ||
build: | ||
<<: *container_config | ||
steps: | ||
- attach_workspace: | ||
at: /workspace | ||
- add_ssh_keys: | ||
fingerprints: | ||
- *deploy_ssh_fingerprint | ||
- *step_setup_git | ||
- checkout | ||
- run: composer validate --ansi --strict | ||
- run: composer install | ||
- run: composer test | ||
- persist_to_workspace: | ||
root: /workspace | ||
paths: | ||
- code | ||
|
||
deploy: | ||
<<: *container_config | ||
steps: | ||
- attach_workspace: | ||
at: /workspace | ||
- add_ssh_keys: | ||
fingerprints: | ||
- *deploy_ssh_fingerprint | ||
- *step_setup_git | ||
- checkout | ||
# Planting test asset file. | ||
- run: touch test-file-$(date "+%Y%m%d-%H%M%S").txt | ||
# Demonstration of deployment in 'force-push' mode. | ||
- run: | | ||
vendor/bin/robo artefact \ | ||
[email protected]:integratedexperts/robo-git-artefact-destination.git \ | ||
--mode=force-push \ | ||
--branch=mode-force-push \ | ||
--report=$HOME/report-mode-force-push.txt \ | ||
--push | ||
DEPLOY_BRANCH=$(sed -n 's/Remote branch://p' $HOME/report-mode-force-push.txt | sed 's/ //g') | ||
echo "Deployed to $DEPLOY_BRANCH" | ||
# Demonstration of deployment in 'branch' mode. | ||
- run: | | ||
vendor/bin/robo artefact \ | ||
[email protected]:integratedexperts/robo-git-artefact-destination.git \ | ||
--mode=branch \ | ||
--branch=mode-branch-[timestamp:Y-m-d_H-i-s] \ | ||
--report=$HOME/report-mode-branch.txt \ | ||
--push | ||
DEPLOY_BRANCH=$(sed -n 's/Remote branch://p' $HOME/report-mode-branch.txt | sed 's/ //g') | ||
echo "Deployed to $DEPLOY_BRANCH" | ||
workflows: | ||
version: 2 | ||
main: | ||
jobs: | ||
- build | ||
- deploy: | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: master |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
vendor | ||
artefact | ||
.vagrant | ||
Vagrantfile | ||
.beetbox | ||
composer.lock | ||
git_* |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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