Skip to content

Commit

Permalink
Merge pull request #22 from andock-ci/develop
Browse files Browse the repository at this point in the history
Version: 0.3.8
  • Loading branch information
christianwiedemann committed Jul 4, 2018
2 parents 7438fbb + 5341d9a commit 7b9493a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 34 deletions.
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
sudo: required
dist: trusty
language: python
python:
- "2.6"
- "2.7"
language: php
php:
- "7.1"
services:
- docker
env:
Expand All @@ -20,7 +19,6 @@ script:
- set -e
- cd tests
- git clone git@github.com:andock-ci/drupal-8-demo.git
# Not working now. @TODO: Fix text.
# - bats build.bats
- bats build.bats
- bats server.bats
- bats fin.bats
33 changes: 10 additions & 23 deletions bin/acp.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

ANSIBLE_VERSION="2.4.4"
ANDOCK_CI_VERSION=0.3.7
ANDOCK_CI_VERSION=0.3.8

REQUIREMENTS_ANDOCK_CI_BUILD='0.1.0'
REQUIREMENTS_ANDOCK_CI_FIN='0.2.1'
Expand Down Expand Up @@ -196,33 +196,21 @@ generate_playbooks()
echo "---
- hosts: andock-ci-build-server
roles:
- { role: andock_ci.build }
- { role: andock-ci.build }
" > "${ANDOCK_CI_PLAYBOOK}/build.yml"

echo "---
- hosts: andock-ci-docksal-server
gather_facts: true
roles:
- { role: andock_ci.fin, git_repository_path: \"{{ git_target_repository_path }}\" }
- { role: andock-ci.fin, git_repository_path: \"{{ git_target_repository_path }}\" }
" > "${ANDOCK_CI_PLAYBOOK}/fin.yml"

echo "---
- hosts: andock-ci-build-server
roles:
- { role: andock_ci.tag, git_repository_path: \"{{ git_source_repository_path }}\" }
" > "${ANDOCK_CI_PLAYBOOK}/tag_source.yml"

echo "---
- hosts: andock-ci-build-server
roles:
- { role: andock_ci.tag, git_repository_path: \"{{ git_target_repository_path }}\" }
" > "${ANDOCK_CI_PLAYBOOK}/tag_target.yml"


echo "---
- hosts: andock-ci-docksal-server
roles:
- role: andock_ci.ansible_role_ssh_keys
- role: andock-ci.ansible_role_ssh_keys
ssh_keys_clean: False
ssh_keys_user:
andock-ci:
Expand All @@ -232,7 +220,7 @@ generate_playbooks()
echo "---
- hosts: andock-ci-docksal-server
roles:
- { role: andock_ci.server }
- { role: andock-ci.server }
" > "${ANDOCK_CI_PLAYBOOK}/server_install.yml"

}
Expand All @@ -251,8 +239,6 @@ install_pipeline()
sudo apt-get install whois sudo build-essential libssl-dev libffi-dev python-dev -y

set -e
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

# Don't install own pip inside travis.
if [ "${TRAVIS}" = "true" ]; then
Expand All @@ -263,6 +249,7 @@ install_pipeline()
sudo pip install ansible=="${ANSIBLE_VERSION}"
rm get-pip.py
fi
sudo pip install urllib3 pyOpenSSL ndg-httpsclient pyasn1

which ssh-agent || ( sudo apt-get update -y && sudo apt-get install openssh-client -y )

Expand All @@ -278,10 +265,10 @@ install_configuration ()
#export ANSIBLE_RETRY_FILES_ENABLED="False"
generate_playbooks
echo-green "Installing roles:"
ansible-galaxy install andock_ci.ansible_role_ssh_keys,v${REQUIREMENTS_SSH_KEYS} --force
ansible-galaxy install andock_ci.build,v${REQUIREMENTS_ANDOCK_CI_BUILD} --force
ansible-galaxy install andock_ci.fin,v${REQUIREMENTS_ANDOCK_CI_FIN} --force
ansible-galaxy install andock_ci.server,v${REQUIREMENTS_ANDOCK_CI_SERVER} --force
ansible-galaxy install andock-ci.build,v${REQUIREMENTS_ANDOCK_CI_BUILD} --force
ansible-galaxy install andock-ci.fin,v${REQUIREMENTS_ANDOCK_CI_FIN} --force
ansible-galaxy install andock-ci.ansible_role_ssh_keys,v${REQUIREMENTS_SSH_KEYS} --force
ansible-galaxy install andock-ci.server,v${REQUIREMENTS_ANDOCK_CI_SERVER} --force
echo "
[andock-ci-build-server]
localhost ansible_connection=local
Expand Down
12 changes: 12 additions & 0 deletions docs/getting-started/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Build your project.
Why should you build your project first?
The build process is made for a scenario where your production site is hosted on acquia etc.
@TODO

### Sample build_tasks.yml
```
- name: Init andock-ci environment
command: "composer install"
args:
chdir: "{{ checkout_path }}"
```
4 changes: 1 addition & 3 deletions docs/getting-started/ci.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Setup instructions
# CI configuration

<a name="install"></a>
## Installation gitlab.

TBD.

Expand Down
12 changes: 10 additions & 2 deletions docs/getting-started/docksal.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,25 @@ fin acp server:ssh-add "ssh-rsa AAAAB3NzaC1yc2EA ..."
```
fin acp config:generate
```

This will create some required config files and templates for init, build, test and update hooks.
#### Build project (optional)
@TODO If you like to build your project and push it to target repository before you check it out on andock-ci server.
[See](build.md)
#### Initialize remote environment
```
fin acp fin init
```

#### Update remote environment
```
fin acp fin up
fin acp fin update
```

#### Run tests
```
fin acp fin test
```

### Congratulations, the installation is finished!


Expand Down

0 comments on commit 7b9493a

Please sign in to comment.