-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #547 from opendevshop/develop
Bring develop branch work back to 1.x
- Loading branch information
Showing
52 changed files
with
7,420 additions
and
758 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,53 @@ | ||
name: "Components" | ||
|
||
on: [push] | ||
|
||
jobs: | ||
yaml-tasks: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
# Set working directory for entire file. https://github.community/t5/GitHub-Actions/use-working-directory-for-entire-job/td-p/36759 | ||
env: | ||
working-directory: ./src/DevShop/Component/YamlTasks | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Get Composer Cache Directory | ||
working-directory: ${{env.working-directory}} | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Validate composer.json and composer.lock | ||
working-directory: ${{env.working-directory}} | ||
run: composer validate | ||
|
||
- name: Install dependencies | ||
working-directory: ${{env.working-directory}} | ||
run: composer install --prefer-dist --no-progress --no-suggest | ||
|
||
- name: Create a branch for the yaml-tests to read. | ||
working-directory: ${{env.working-directory}} | ||
run: git checkout -b $( echo ${GITHUB_REF} | sed 's/refs\/heads\///') | ||
|
||
- name: Run Yaml Tests | ||
working-directory: ${{env.working-directory}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# @TODO: Get environment variable setting to work. | ||
# YAML_TASKS_STATUS_URL: https://github.com/${GITHUB_REPOSITORY}/runs/${GITHUB_RUN_ID}?check_suite_focus=true | ||
PROVISION_PROCESS_OUTPUT: direct | ||
run: | | ||
chmod +x yaml-tasks | ||
./yaml-tasks --ansi -v --hostname=github.com --status-url=https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}?check_suite_focus=true | ||
./yaml-tasks --tasks-file tests.yml --ansi -v --hostname=github.com --status-url=https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}?check_suite_focus=true | ||
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,5 +1,11 @@ | ||
name: Git Management | ||
on: [push] | ||
env: | ||
GITHUB_USERNAME: devshopbot | ||
GITSPLIT_GITHUB_TOKEN: ${{ secrets.INPUT_GITHUB_TOKEN }} | ||
DEVSHOP_REPO: opendevshop/devshop | ||
DEVSHOP_PACKAGES_REPO: devshop-packages/git-split | ||
|
||
jobs: | ||
monorepo-split: | ||
name: Split Git Repositories | ||
|
@@ -8,11 +14,19 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Confirm write access to $DEVSHOP_REPO | ||
run: | | ||
curl -u $GITHUB_USERNAME:$GITSPLIT_GITHUB_TOKEN https://api.github.com/repos/$DEVSHOP_REPO/collaborators/$GITHUB_USERNAME/permission | grep "permission" | grep "admin | ||
write" | ||
- name: Confirm write access to $DEVSHOP_PACKAGES_REPO. | ||
run: | | ||
curl -u $GITHUB_USERNAME:$GITSPLIT_GITHUB_TOKEN https://api.github.com/repos/$DEVSHOP_PACKAGES_REPO/collaborators/$GITHUB_USERNAME/permission | grep "permission" | grep "admin | ||
write" | ||
- uses: fregante/setup-git-token@v1 | ||
with: | ||
token: ${{ secrets.INPUT_GITHUB_TOKEN }} | ||
name: devshopbot | ||
email: [email protected] | ||
|
||
- name: Cache git split database file. | ||
uses: actions/cache@v1 | ||
|
@@ -29,6 +43,22 @@ jobs: | |
- run: mkdir $HOME/.ssh | ||
- name: Authorize GitHub.com as a known_host | ||
run: ssh-keyscan github.com > $HOME/.ssh/known_hosts | ||
|
||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install Composer dependencies | ||
run: composer install --prefer-dist --no-progress --no-suggest | ||
|
||
# @TODO: Our plugin could be coded to output the commands needed to run splitsh-lite.sh directly. This would shorten CI runs because we wouldn't need composer install for the Git Split job. | ||
- name: Split monorepo | ||
run: composer split | ||
run: composer git:split |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -17,24 +17,35 @@ | |
} | ||
], | ||
"require": { | ||
"php": "^7.1", | ||
"knplabs/github-api": "^1.4", | ||
"cpliakas/git-wrapper": "2.*", | ||
"asm/php-ansible": "^2.0", | ||
"mouf/nodejs-installer": "^1.0", | ||
"php": "^7.1", | ||
"provision-ops/power-process": "^1.3" | ||
"devshop/yaml-tasks": "*", | ||
"devshop/git-split": "*", | ||
"cpliakas/git-wrapper": "^1.0", | ||
"drush/drush": "^8" | ||
}, | ||
"require-dev": { | ||
"composer/composer": "^1.9" | ||
}, | ||
"authors": [ | ||
"autoload": { | ||
"psr-0": { "DevShop": "src/" }, | ||
"autoload": { | ||
"psr-4": { | ||
"DevShop\\Component\\": "src/DevShop/Component/" | ||
} | ||
} | ||
}, | ||
"repositories": [ | ||
{ | ||
"name": "Jon Pugh", | ||
"email": "[email protected]" | ||
"type": "path", | ||
"url": "src/DevShop/Component/GitSplit" | ||
}, | ||
{ | ||
"type": "path", | ||
"url": "src/DevShop/Component/YamlTasks" | ||
} | ||
], | ||
"autoload": { | ||
"psr-0": { "DevShop": "src/" } | ||
}, | ||
"bin": [ | ||
"scripts/devshop", | ||
"scripts/branch-or-tag" | ||
|
@@ -46,18 +57,23 @@ | |
}, | ||
"sort-packages:": "true" | ||
}, | ||
"extra": { | ||
"git-split": { | ||
"repos": { | ||
"tests/test-repo": "https://github.com/devshop-packages/test-repo.git", | ||
"devmaster": "https://github.com/opendevshop/devmaster.git", | ||
"roles/opendevshop.apache": "https://github.com/opendevshop/ansible-role-apache.git", | ||
"roles/opendevshop.devmaster": "https://github.com/opendevshop/ansible-role-devmaster.git", | ||
"roles/opendevshop.users": "https://github.com/opendevshop/ansible-role-user.git", | ||
"src/DevShop/Component/GitSplit": "https://github.com/devshop-packages/git-split.git", | ||
"src/DevShop/Component/YamlTasks": "https://github.com/devshop-packages/yaml-tasks.git" | ||
} | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"scripts": { | ||
"bin-install": [ | ||
"DevShop\\Composer::installBins" | ||
], | ||
"split": [ | ||
"DevShop\\Composer::installBins", | ||
"DevShop\\Composer::splitRepos" | ||
], | ||
"post-install-cmd": [ | ||
"DevShop\\Composer::installBins" | ||
], | ||
"pre-update-cmd": [ | ||
], | ||
|
Oops, something went wrong.