-
Notifications
You must be signed in to change notification settings - Fork 284
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 #782 from xibosignage/release22
Release 2.2.2
- Loading branch information
Showing
120 changed files
with
9,721 additions
and
9,252 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,79 @@ | ||
name: Build Container | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
- release22 | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
name: Build Containers | ||
if: github.repository == 'xibosignage/xibo-cms' | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Build Latest | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
run: | | ||
docker build . -t xibosignage/xibo-cms:latest | ||
- name: Build Branch | ||
if: github.event_name == 'push' && github.ref != 'refs/heads/master' | ||
run: | | ||
docker build . -t xibosignage/xibo-cms:${GITHUB_REF##*/} | ||
- name: Push Latest | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
run: | | ||
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_TOKEN }} | ||
docker push xibosignage/xibo-cms:latest | ||
- name: Push Branch | ||
if: github.event_name == 'push' && github.ref != 'refs/heads/master' | ||
run: | | ||
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_TOKEN }} | ||
docker push xibosignage/xibo-cms:${GITHUB_REF##*/} | ||
- name: Build Release | ||
if: github.event_name == 'release' | ||
run: | | ||
docker build . -t xibosignage/xibo-cms:release-${GITHUB_REF##*/} | ||
- name: Push Release | ||
if: github.event_name == 'release' | ||
run: | | ||
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_TOKEN }} | ||
docker push xibosignage/xibo-cms:release-${GITHUB_REF##*/} | ||
deploy: | ||
name: Deploy Test Instances | ||
runs-on: ubuntu-18.04 | ||
needs: build | ||
if: github.repository == 'xibosignage/xibo-cms' && github.event_name == 'push' | ||
steps: | ||
- name: Deploy to Develop | ||
uses: joelwmale/[email protected] | ||
if: github.ref == 'refs/heads/develop' | ||
env: | ||
WEBHOOK_URL: ${{ secrets.WEBHOOK_DEVELOP_URL }} | ||
data: '' | ||
- name: Deploy to Staging | ||
uses: joelwmale/[email protected] | ||
if: github.ref == 'refs/heads/release22' | ||
env: | ||
WEBHOOK_URL: ${{ secrets.WEBHOOK_STAGING_URL }} | ||
data: '' | ||
|
||
in_fork: | ||
name: Skip in a fork | ||
runs-on: ubuntu-18.04 | ||
if: github.repository != 'xibosignage/xibo-cms' | ||
steps: | ||
- name: Skip | ||
run: | | ||
echo 'Skipped while in a fork' |
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,33 @@ | ||
name: Build Cypress | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
name: Build Cypress | ||
if: github.repository == 'xibosignage/xibo-cms' | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
- name: Build | ||
run: | | ||
docker build -f Dockerfile.cypress . -t xibosignage/xibo-cms:cypress | ||
- name: Push | ||
run: | | ||
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_TOKEN }} | ||
docker push xibosignage/xibo-cms:cypress | ||
in_fork: | ||
name: Skip in a fork | ||
runs-on: ubuntu-18.04 | ||
if: github.repository != 'xibosignage/xibo-cms' | ||
steps: | ||
- name: Skip | ||
run: | | ||
echo 'Skipped while in a fork' |
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,43 @@ | ||
name: Test Suite | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test-suite: | ||
name: Build Containers and Run Tests | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
- name: Pull | ||
run: | | ||
docker pull mysql:5.6 | ||
docker pull xibosignage/xibo-xmr:latest | ||
docker pull xibosignage/xibo-cms:develop | ||
docker pull xibosignage/xibo-cms:cypress | ||
- name: Build | ||
run: | | ||
docker build . -f Dockerfile.ci -t cms-web | ||
- name: Run | ||
run: | | ||
docker run --name cms-db -e MYSQL_RANDOM_ROOT_PASSWORD=yes -e MYSQL_DATABASE=cms -e MYSQL_USER=cms -e MYSQL_PASSWORD=jenkins -d mysql:5.6 | ||
docker run --name cms-xmr -d xibosignage/xibo-xmr:latest | ||
docker run --name cms-web -e MYSQL_USER=cms -e MYSQL_PASSWORD=jenkins -e XIBO_DEV_MODE=true -e XMR_HOST=cms-xmr --link cms-db:db --link cms-xmr:50001 -d cms-web | ||
- name: Wait for CMS | ||
run: | | ||
docker exec -t cms-web /bin/bash -c "/usr/local/bin/wait-for-command.sh -q -t 300 -c \"nc -z localhost 80\"" | ||
docker cp cms-web:/var/www/cms/web/settings.php web/settings.php | ||
docker exec -t cms-web /bin/bash -c "chown -R apache.apache /var/www/cms" | ||
docker exec --user apache -t cms-web /bin/bash -c "cd /var/www/cms/db/migrations; ls -al" | ||
docker exec --user apache -t cms-web /bin/bash -c "cd /var/www/cms; /usr/bin/php bin/run.php 1" | ||
sleep 5 | ||
- name: Run PHP Unit | ||
run: | | ||
docker exec --user apache -t cms-web /bin/bash -c "cd /var/www/cms; php vendor/bin/phpunit --verbose --tap --log-junit results.xml" | ||
- name: Run Cypress | ||
run: | | ||
docker exec cms-db mysql -ucms -pjenkins cms -e "INSERT INTO oauth_clients (id, secret, name, userId, authCode, clientCredentials) VALUES ('MrGPc7e3IL1hA6w13l7Ru5giygxmNiafGNhFv89d', 'Pk6DdDgu2HzSoepcMHRabY60lDEvQ9ucTejYvc5dOgNVSNaOJirCUM83oAzlwe0KBiGR2Nhi6ltclyNC1rmcq0CiJZXzE42KfeatQ4j9npr6nMIQAzMal8O8RiYrIoono306CfyvSSJRfVfKExIjj0ZyE4TUrtPezJbKmvkVDzh8aj3kbanDKatirhwpfqfVdfgsqVNjzIM9ZgKHnbrTX7nNULL3BtxxNGgDMuCuvKiJFrLSyIIz1F4SNrHwHz', 'cypress', 1, 0, 1)" | ||
docker exec cms-db mysql -ucms -pjenkins cms -e "INSERT INTO oauth_client_scopes (clientId, scopeId) VALUES ('MrGPc7e3IL1hA6w13l7Ru5giygxmNiafGNhFv89d', 'all') ON DUPLICATE KEY UPDATE scopeId = scopeId" | ||
docker run --name cms-cypress --link=cms-web:web -v $(pwd)/cypress.json:/app/cypress.json -v $(pwd)/cypress:/app/cypress xibosignage/xibo-cms:cypress bash -c "CYPRESS_baseUrl=http://web /app/node_modules/.bin/cypress run --config screenshotsFolder=/app/results,video=false --reporter junit --reporter-options 'mochaFile=/app/results/results_cypress_[hash].xml,toConsole=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
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
Oops, something went wrong.