Skip to content

Commit

Permalink
Merge pull request #322 from UN-OCHA/develop
Browse files Browse the repository at this point in the history
Develop --> Main
  • Loading branch information
orakili committed May 13, 2022
2 parents f915323 + ad376e9 commit 461d679
Show file tree
Hide file tree
Showing 968 changed files with 58,602 additions and 17,738 deletions.
3 changes: 2 additions & 1 deletion .docksal/docksal.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: "2.1"
version: "3.9"

services:
# MailHog
mail:
Expand Down
66 changes: 14 additions & 52 deletions .github/workflows/docker-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,57 +13,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
id: checkout
uses: actions/checkout@v1

- name: Determine environment type
id: env
uses: docker://unocha/actions:determine-environment-main

- name: Configure AWS Credentials
id: aws
uses: aws-actions/configure-aws-credentials@v1
- name: Build
id: build-action
uses: UN-OCHA/actions/drupal-docker-build@main
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Build docker image
id: build
run: |
export DOCKER_TAG="${GITHUB_REF#refs/*/}"
export DOCKER_TAG=${DOCKER_TAG//[^[:alnum:].-]/-}
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/unocha || exit 1
docker build \
--build-arg BRANCH_ENVIRONMENT=${BRANCH_ENVIRONMENT} \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VCS_URL=`git config --get remote.origin.url | sed 's#git@github.com:#https://github.com/#'` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg GITHUB_ACTOR=${GITHUB_ACTOR} \
--build-arg GITHUB_REPOSITORY=${GITHUB_REPOSITORY} \
--build-arg GITHUB_SHA=${GITHUB_SHA} \
--build-arg GITHUB_REF=${GITHUB_REF} \
. --file docker/Dockerfile --tag public.ecr.aws/unocha/rwint9-site:${DOCKER_TAG} || exit 1
docker push public.ecr.aws/unocha/rwint9-site:${DOCKER_TAG} || exit 1
continue-on-error: true

- name: Flowdock Failure
id: failure
if: steps.build.outputs.exitcode == 1
uses: docker://unocha/actions:flowdock-notify-main
env:
FLOWDOCK_TOKEN: ${{ secrets.FLOWDOCK_TOKEN }}
FLOWDOCK_ICON: 'warning'
FLOWDOCK_MESSAGE: 'Failed to build a new `unocha/rwint9-site` image from ${{ github.ref }} , please go check [GitHub](https://github.com/UN-OCHA/rwint9-site/actions/workflows/docker-build-image.yml).'
FLOWDOCK_TAGS: 'build,docker,${{ github.actor }}'

- name: Flowdock Success
id: success
if: steps.build.outputs.exitcode == 0
uses: docker://unocha/actions:flowdock-notify-main
env:
FLOWDOCK_TOKEN: ${{ secrets.FLOWDOCK_TOKEN }}
FLOWDOCK_ICON: 'package'
FLOWDOCK_MESSAGE: 'Built a new `unocha/rwint9-site` image from ${{ github.ref }} and pushed to [Amazon ECR](https://gallery.ecr.aws/unocha/rwint9-site).'
FLOWDOCK_TAGS: 'build,docker,${{ github.actor }}'
aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
docker_registry_url: public.ecr.aws
docker_registry_path: /unocha/
docker_image: rwint9-site
docker_username: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
docker_password: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
ecr_github_token: ${{ secrets.ECR_GITHUB_TOKEN }}
ecr_jenkins_token: ${{ secrets.JENKINS_ECR_TOKEN }}
flowdock_token: ${{ secrets.FLOWDOCK_TOKEN }}
flowdock_icon_failure: 'warning'
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ script:
# Install the dev dependencies.
- docker exec -it -w /srv/www rwint9-test-site composer install

# Ensure the drupal coding standards config is installed.
- docker exec -it -u appuser -w /srv/www rwint9-test-site ./vendor/bin/phpcs --config-set installed_paths vendor/drupal/coder/coder_sniffer

# Check coding standards.
- docker exec -it -u appuser -w /srv/www rwint9-test-site ./vendor/bin/phpcs -p --report=full ./html/modules/custom ./html/themes/custom

Expand Down
83 changes: 44 additions & 39 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
{
"type": "vcs",
"url": "https://github.com/UN-OCHA/common_design.git"
"url": "https://github.com/UN-OCHA/rwint-api-indexer.git"
}
],
"require": {
Expand All @@ -53,56 +53,59 @@
"drupal-composer/preserve-paths": "^0.1.6",
"drupal/admin_denied": "^1.1",
"drupal/allowed_formats": "^1.3",
"drupal/components": "^2.2",
"drupal/config_split": "^2.0.0-beta4",
"drupal/core-composer-scaffold": "^9.2.4",
"drupal/core-dev": "^9.2.4",
"drupal/core-recommended": "^9.2.4",
"drupal/geofield": "^1.22",
"drupal/components": "^2.4",
"drupal/config_split": "^2.0.0-rc1",
"drupal/content_entity_clone": "^1.0.0",
"drupal/core-composer-scaffold": "^9.3",
"drupal/core-dev": "^9.3",
"drupal/core-recommended": "^9.3",
"drupal/geofield": "^1.39",
"drupal/google_tag": "^1.4",
"drupal/guidelines": "^1.0",
"drupal/imageapi_optimize_binaries": "^1.0-alpha2",
"drupal/imagemagick": "^3.3",
"drupal/inline_entity_form": "^1.0@RC",
"drupal/mailsystem": "^4.3",
"drupal/maintenance200": "^1.1",
"drupal/metatag": "^1.16",
"drupal/migrate_plus": "^5.1",
"drupal/migrate_plus": "^5.3",
"drupal/migrate_tools": "^5.0",
"drupal/mimemail": "^1.0@alpha",
"drupal/paragraphs": "^1.12",
"drupal/paragraphs_viewmode": "^1.0",
"drupal/pathauto": "^1.8",
"drupal/redirect": "^1.6",
"drupal/mimemail": "^1.0-alpha4",
"drupal/pathauto": "^1.10",
"drupal/redirect": "^1.7",
"drupal/redis": "^1.5",
"drupal/social_auth_hid": "^2.6",
"drupal/social_auth_hid": "^3.0",
"drupal/svg_image": "^1.15",
"drupal/taxonomy_term_preview": "^1.0.0",
"drupal/taxonomy_term_revision": "1.x-dev",
"drupal/theme_switcher": "^1.2",
"drupal/token": "^1.9",
"drupal/token": "^1.10",
"drupal/user_display_name": "^1.0",
"drush/drush": "^10.4",
"league/commonmark": "^1.6",
"drush/drush": "^11.0",
"league/commonmark": "^2.2",
"league/html-to-markdown": "^5.0",
"pelago/emogrifier": "^5.0",
"reliefweb/simple-autocomplete": "v1.3.0",
"pelago/emogrifier": "^6.0",
"reliefweb/api-indexer": "^v2.2",
"reliefweb/simple-autocomplete": "^v1.3.0",
"reliefweb/simple-datepicker": "^v1.3.1",
"symfony/flex": "^1.12",
"symfony/uid": "^5.3",
"unocha/common_design": "dev-cd-304-forms",
"symfony/flex": "^2.0",
"symfony/uid": "^6.0",
"unocha/common_design": "^7.0.0",
"webflo/drupal-finder": "^1.2.2"
},
"require-dev": {
"drupal/coder": "^8.3.12",
"drupal/coder": "^8.3",
"drupal/config_filter": "^2.2",
"drupal/console": "^1.9.7",
"drupal/devel": "^4.1",
"drupal/devel_php": "^1.3",
"drupal/stage_file_proxy": "^1.1",
"drupal/stage_file_proxy": "^1.2",
"kint-php/kint": "^3.3",
"mikey179/vfsstream": "^1.6.8",
"phpcompatibility/php-compatibility": "^9.3.5",
"phpmd/phpmd": "^2.9.1",
"mikey179/vfsstream": "^1.6",
"phpcompatibility/php-compatibility": "^9.3",
"phpmd/phpmd": "^2.11",
"phpspec/prophecy-phpunit": "^2",
"phpunit/php-code-coverage": "^9.2",
"phpunit/phpunit": "^9.5.4",
"phpunit/phpunit": "^9.5",
"weitzman/drupal-test-traits": "^1.5"
},
"conflict": {
Expand All @@ -112,24 +115,26 @@
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"platform": {
"php": "8.0"
},
"bin-dir": "vendor/bin/",
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal-composer/preserve-paths": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"drupal/console-extend-plugin": true,
"oomphinc/composer-installers-extender": true,
"symfony/flex": true
}
},
"autoload": {
"classmap": [
"scripts/composer/ScriptHandler.php"
]
},
"scripts": {
"pre-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"pre-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"post-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
"DrupalProject\\composer\\ScriptHandler::removeUnnecessaryFiles",
Expand Down
Loading

0 comments on commit 461d679

Please sign in to comment.