Skip to content

Commit

Permalink
Merge pull request #127 from devilbox/release-0.90
Browse files Browse the repository at this point in the history
Release 0.90
  • Loading branch information
cytopia authored Nov 4, 2019
2 parents 47d2d1f + bc01b39 commit f59dd5b
Show file tree
Hide file tree
Showing 59 changed files with 9,966 additions and 5,878 deletions.
250 changes: 250 additions & 0 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
---

# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: PHP


# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs on Pull Requests
pull_request:

# Runs on master Branch and Tags
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+*'

# Runs daily
schedule:
- cron: '0 0 * * *'


# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs:
diagnostics:
name: Diagnostics
runs-on: ubuntu-latest
strategy:
fail-fast: False
steps:
- name: Checkout repository
uses: actions/checkout@v1

- name: Show environment
run: |
env
- name: Show GitHub variables
run: |
echo "github.actor: ${{ github.actor }}"
echo "github.ref: ${{ github.ref }}"
echo "github.event: ${{ github.event }}"
echo "github.event_name: ${{ github.event_name }}"
echo "github.event.pull_request.base.repo.id: ${{ github.event.pull_request.base.repo.id }}"
echo "github.event.pull_request.head.repo.id: ${{ github.event.pull_request.head.repo.id }}"
build:
name: "[ ${{ matrix.version }} ]"
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
# Adding all targets and only run them if they exist.
# Prevents us from forgetting to update this in case
# we add new envs in terragrunt.
version:
- '5.2'
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
steps:
- name: Checkout repository
uses: actions/checkout@v1

# ------------------------------------------------------------
# Base
# ------------------------------------------------------------
- name: Build Base
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
done;
return 1;
}
sleep 10
retry make build-base VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5

- name: Test Base
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
done;
return 1;
}
sleep 10
retry make test-base VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5


# ------------------------------------------------------------
# Mods
# ------------------------------------------------------------
- name: Build Mods
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
done;
return 1;
}
sleep 10
retry make build-mods VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5

- name: Test Mods
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
done;
return 1;
}
sleep 10
retry make test-mods VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5


# ------------------------------------------------------------
# Prod
# ------------------------------------------------------------
- name: Build Prod
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
done;
return 1;
}
sleep 10
retry make build-prod VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5

- name: Test Prod
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
done;
return 1;
}
sleep 10
retry make test-prod VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5


# ------------------------------------------------------------
# Work
# ------------------------------------------------------------
- name: Build Work
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
done;
return 1;
}
sleep 10
retry make build-work VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5

- name: Test Work
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
done;
return 1;
}
sleep 10
retry make test-work VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5


# ------------------------------------------------------------
# Diff README.md
# ------------------------------------------------------------
- name: Diff README.md
run: |
make gen-readme VERSION=${VERSION}
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
env:
VERSION: ${{ matrix.version }}


# ------------------------------------------------------------
# Push build artifacts
# ------------------------------------------------------------

# Only run this, if the PR was created by the repo owner
- name: Publish images (only repo owner)
run: |
echo "Todo: Push to Dockerhub"
if: (github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id || github.ref == 'refs/heads/master')
27 changes: 27 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---

###
### Lints all generic and json files in the whole git repository
###

name: linting
on:
pull_request:

jobs:
lint:
name: "[ ${{ matrix.job }} ]"
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
job: [gen-dockerfiles]
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Diff generated Docker files
run: |
make "${JOB}"
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
env:
JOB: ${{ matrix.job }}
36 changes: 21 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
### Travis settings
###
sudo: required
language: python
language: minimal
services:
- docker

Expand Down Expand Up @@ -40,9 +40,6 @@ env:
### Install requirements
###
install:
# Get newer docker version
- max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get update; then break; else i=$((i+1)); fi done
- max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce; then break; else i=$((i+1)); fi done
- docker version

# Disable services enabled by default
Expand All @@ -64,31 +61,40 @@ install:
- sudo service redis stop || true
- netstat -tulpn

- retry() {
for ((n=0; n<10; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
done;
return 1;
}


###
### Check generation changes, build and test
###
before_script:
# Regenerate Dockerfiles and make sure nothing has changed (every stage)
- pip install ansible
- make generate
- make gen-dockerfiles
- git diff --quiet || { echo "Build Changes"; git diff; git status; false; }

# Build (multiple tries due to network outages)
- max=100; i=0; while [ $i -lt $max ]; do if make build-base-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
- make test-base-${PHP//.}
- retry make build-base VERSION=${PHP}
#- retry make test-base VERSION=${PHP}

- max=100; i=0; while [ $i -lt $max ]; do if make build-mods-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
- make test-mods-${PHP//.}
- retry make build-mods VERSION=${PHP}
#- retry make test-mods VERSION=${PHP}

- max=100; i=0; while [ $i -lt $max ]; do if make build-prod-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
- make test-prod-${PHP//.}
- retry make build-prod VERSION=${PHP}
#- retry make test-prod VERSION=${PHP}

- max=100; i=0; while [ $i -lt $max ]; do if make build-work-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
- make test-work-${PHP//.}
- retry make build-work VERSION=${PHP}
- retry make test-work VERSION=${PHP}

# Test if PHP modules have changed
- ./build/gen-readme.sh "${PHP}"
- make gen-readme VERSION=${PHP}
- git diff --quiet || { echo "Build Changes"; git diff; git status; false; }


Expand Down
1 change: 1 addition & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ rules:
require-starting-space: false
min-spaces-from-content: 1
line-length: disable
truthy: disable
Loading

0 comments on commit f59dd5b

Please sign in to comment.