drop ubuntu build
Some checks failed
ci/woodpecker/push/build_dev Pipeline failed

This commit is contained in:
Ruben Momoa
2024-08-22 15:55:16 +02:00
parent e2137eb2e6
commit 8aedf67aba
7 changed files with 69 additions and 140 deletions

View File

@@ -1,37 +0,0 @@
when:
path:
include: [ '.woodpecker/build_alpine.yml', 'build/*', 'Dockerfile_alpine' ]
cron: nightly
event: [ cron, release, push, manual ]
steps:
cron_pre_check:
image: docker
commands:
- docker pull php:8-fpm-alpine
- docker pull vistanarvas/simple-laravel:dev-alpine
- BASE_IMG=$(docker inspect php:8-fpm-alpine --format='{{.Created}}' | cut -d '.' -f 1)
- PREV_IMG=$(docker inspect vistanarvas/simple-laravel:dev-alpine --format='{{.Created}}' | cut -d '.' -f 1)
- BASE_DATE=$(date -D "%Y-%m-%dT%H:%M:%S" -d "$BASE_IMG" +%s)
- PREV_DATE=$(date -D "%Y-%m-%dT%H:%M:%S" -d "$PREV_IMG" +%s)
- if [ "$PREV_DATE" -gt "$BASE_DATE" ]; then exit 1; fi
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# dev_alpine_build_and_publish:
# image: woodpeckerci/plugin-docker-buildx
# settings:
# username: vistanarvas
# password:
# from_secret: DOCKERHUB_TOKEN
# context: ./build
# repo: vistanarvas/${CI_REPO_NAME}
# tag: ${CI_COMMIT_BRANCH}-alpine
# dockerfile: Dockerfile_alpine
# when:
# evaluate: '! test -f SKIP_BUILD'
# branch:
# exclude: [ main, master ]
# path:
# include: [ '.woodpecker/build_alpine.yml', 'build/*', 'Dockerfile_alpine' ]
# event: [ push, manual ]

25
.woodpecker/build_dev.yml Normal file
View File

@@ -0,0 +1,25 @@
matrix:
PHP_VERSION:
- latest
when:
branch:
exclude: [ main, master ]
path:
include: [ '.woodpecker/build_dev.yml', 'build/*', 'Dockerfile' ]
cron: nightly
event: [ push, manual ]
steps:
dev_alpine_build_and_publish:
image: woodpeckerci/plugin-docker-buildx
settings:
username: vistanarvas
password:
from_secret: DOCKERHUB_TOKEN
context: ./build
repo: vistanarvas/${CI_REPO_NAME}
tag: ${CI_COMMIT_BRANCH}-${PHP_VERSION}
dockerfile: Dockerfile_alpine
build_args:
PHP_VERSION: ${PHP_VERSION}

View File

@@ -0,0 +1,41 @@
matrix:
PHP_VERSION:
- latest
- 8-fpm-alpine
- 8.3-fpm-alpine
- 8.2-fpm-alpine
- 8.1-fpm-alpine
when:
branch:
include: [ main, master ]
cron: nightly
event: [ cron, release, manual ]
steps:
cron_pre_check:
image: docker
commands:
- docker pull php:${PHP_VERSION}
- docker pull vistanarvas/simple-laravel:${PHP_VERSION}
- BASE_IMG=$(docker inspect php:${PHP_VERSION} --format='{{.Created}}' | cut -d '.' -f 1)
- PREV_IMG=$(docker inspect vistanarvas/simple-laravel:${PHP_VERSION} --format='{{.Created}}' | cut -d '.' -f 1)
- BASE_DATE=$(date -D "%Y-%m-%dT%H:%M:%S" -d "$BASE_IMG" +%s)
- PREV_DATE=$(date -D "%Y-%m-%dT%H:%M:%S" -d "$PREV_IMG" +%s)
- if [ "$PREV_DATE" -gt "$BASE_DATE" ]; then echo "no rebuild needed"; exit 1; fi
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
cron: nightly
event: [ cron ]
release_alpine_build_and_publish:
image: woodpeckerci/plugin-docker-buildx
settings:
username: vistanarvas
password:
from_secret: DOCKERHUB_TOKEN
context: ./build
repo: vistanarvas/${CI_REPO_NAME}
tag: ${PHP_VERSION}
dockerfile: Dockerfile_alpine

View File

@@ -1,57 +0,0 @@
when:
path:
include: [ '.woodpecker/build_ubuntu.yml', 'build/*', 'Dockerfile_ubuntu' ]
cron: nightly
event: [ cron, release, push, manual ]
steps:
release_ubuntu_build_and_publish:
image: woodpeckerci/plugin-docker-buildx
settings:
username: vistanarvas
password:
from_secret: DOCKERHUB_TOKEN
context: ./build
repo: vistanarvas/${CI_REPO_NAME}
auto_tag: true
default_suffix: -ubuntu
dockerfile: Dockerfile_ubuntu
when:
branch:
include: [ main, master ]
event: release
cron_ubuntu_build_and_publish:
image: woodpeckerci/plugin-docker-buildx
settings:
username: vistanarvas
password:
from_secret: DOCKERHUB_TOKEN
context: ./build
repo: vistanarvas/${CI_REPO_NAME}
tag: nightly-ubuntu
dockerfile: Dockerfile_ubuntu
when:
branch:
include: [ main, master ]
path:
include: [ '.woodpecker/build_ubuntu.yml', 'build/*', 'Dockerfile_ubuntu' ]
cron: nightly
event: [ cron ]
dev_ubuntu_build_and_publish:
image: woodpeckerci/plugin-docker-buildx
settings:
username: vistanarvas
password:
from_secret: DOCKERHUB_TOKEN
context: ./build
repo: vistanarvas/${CI_REPO_NAME}
tag: ${CI_COMMIT_BRANCH}-ubuntu
dockerfile: Dockerfile_ubuntu
when:
branch:
exclude: [ main, master ]
path:
include: [ '.woodpecker/build_ubuntu.yml', 'build/*', 'Dockerfile_ubuntu' ]
event: [ push, manual ]

View File

@@ -1,4 +1,6 @@
FROM php:8-fpm-alpine
ARG PHP_VERSION
FROM php:$PHP_VERSION
ENV NVM_DIR="/root/.nvm"

View File

@@ -1,42 +0,0 @@
FROM ubuntu:latest
# node version number like "12.22.1" or empty for the latest version
ARG NODE_VERSION=''
# composer version number like "2.1" or empty for the latest version
ARG COMPOSER_VERSION=''
# disables asking for input
ARG DEBIAN_FRONTEND="noninteractive"
ENV NVM_DIR="/root/.nvm"
# port to for the webserver
ENV WEBSERVER_PORT=8080
COPY start-container.sh /usr/local/bin/start-container
RUN apt-get -y update \
&& apt-get install -y curl git 7zip php php-xml php-curl php-xml php-mbstring php-mysql php-gd php-zip php-bcmath php-intl \
&& apt-get clean \
&& chmod +x /usr/local/bin/start-container \
&& echo "install composer" \
&& curl -o composer-setup.php https://getcomposer.org/installer \
&& curl -o composer-setup.sig https://composer.github.io/installer.sig \
&& echo " composer-setup.php" >> composer-setup.sig \
&& sha384sum -c composer-setup.sig \
&& if [ -n "$COMPOSER_VERSION" ]; then COMPOSER_VERSION="--${COMPOSER_VERSION}"; fi \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer $COMPOSER_VERSION \
&& rm composer-setup.php composer-setup.sig /var/www/html/* \
&& echo "install nvm and node" \
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash \
&& if [ -z "$NODE_VERSION" ]; then NODE_VERSION="node"; fi \
&& [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION;
EXPOSE ${WEBSERVER_PORT}
WORKDIR /var/www/html
ENTRYPOINT ["start-container"]

View File

@@ -3,9 +3,6 @@
# exit when any command fails
set -e
# init nvm
\. "$NVM_DIR"/nvm.sh
if [[ "$BOOT_NPM_INSTALL" = true ]]; then
echo "npm install"
npm install