Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ce-dev-PR-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: pull_request

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ce-dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ce-dev-publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
# Name the Job
name: Publish documentation
# Set the type of machine to run on
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
# Configures global Git variables for committing
Expand Down
38 changes: 35 additions & 3 deletions .github/workflows/ce-dev-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- cron: '30 3 * * *'

jobs:
build:
runs-on: ubuntu-20.04
build-drupal9:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -36,4 +36,36 @@ jobs:
run: |
/bin/sh docker-images/export.sh --version latest --image-name ce-dev --dockerfile-path base
/bin/sh docker-images/export.sh --version latest --image-name ce-dev-controller --dockerfile-path controller
/bin/sh templates/prebuild.sh
/bin/sh templates/prebuild.sh --projects "blank drupal9"

build-drupal10:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: '1.x'
- name: Install modules
run: yarn
# Uses https://oclif.io/
# Not strictly necessary here, but ensures the packing works
- name: Pack the JS
run: yarn oclif-dev pack
# We build mkcert from source because releases are broken
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y p7zip-full libnss3-tools wget
cd /tmp
wget https://golang.org/dl/go1.16.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.16.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
sudo mv ./mkcert /usr/local/bin && cd ../
sudo chmod +x /usr/local/bin/mkcert
rm -Rf mkcert
- name: Build and test
run: |
/bin/sh docker-images/export.sh --version latest --image-name ce-dev --dockerfile-path base
/bin/sh docker-images/export.sh --version latest --image-name ce-dev-controller --dockerfile-path controller
/bin/sh templates/prebuild.sh --projects drupal10
38 changes: 37 additions & 1 deletion templates/prebuild.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,43 @@
#!/bin/sh
# Test project creation and pre-build image.
set -e

usage(){
echo 'prebuild.sh [OPTIONS]'
echo 'Test project creation and pre-build Docker images.'
echo ''
echo 'Available options:'
echo '--projects: space separated string of project types to build, defaults to all'
echo '--push: push images to the Docker registry'
echo ''
}

# Parse options arguments.
parse_options(){
while [ "${1:-}" ]; do
case "$1" in
"--projects")
shift
PROJECTS="$1"
;;
"--push")
PUSH="true"
;;
*)
usage
exit 1
;;
esac
shift
done
}

# Set default variables.
PROJECTS="blank drupal8 drupal9 drupal10"
PUSH="false"

# Parse options.
parse_options "$@"

# Common processing.
OWN_DIR=$(dirname "$0")
Expand Down Expand Up @@ -55,7 +91,7 @@ for PROJECT in $PROJECTS; do
create_project "$PROJECT"
test_project "$PROJECT"
build_project "$PROJECT"
if [ -n "$1" ] && [ "$1" = "--push" ]; then
if [ "$PUSH" = "true" ]; then
push_project "$PROJECT"
fi
done
Loading