Updated .gitlab-ci.yml

This commit is contained in:
Netkas 2023-08-15 20:13:30 -04:00
parent 7ef3bd0e8b
commit 618f49dec6
No known key found for this signature in database
GPG key ID: 5DAF58535614062B

View file

@ -1,43 +1,51 @@
stages:
- prepare
- build
- package
- release
- docker-build
variables:
PACKAGE_PATH: "build/build.tar.gz"
prepare:
image: php:8.1
stage: prepare
script:
- apt update -yqq
- apt install git libpq-dev libzip-dev zip make wget gnupg -yqq
- wget -O phive.phar https://phar.io/releases/phive.phar
- wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc
- gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79
- gpg --verify phive.phar.asc phive.phar
- chmod +x phive.phar
- mv phive.phar /usr/local/bin/phive
- phive install phpab --global --trust-gpg-keys 0x2A8299CE842DD38C
rules:
- if: $CI_COMMIT_BRANCH
build:
image: php:8.1
extends: .prepare
stage: build
script:
- make tar
before_script:
# Install some stuff that the image doesn't come with
- apt update -yqq
- apt install git libpq-dev libzip-dev zip make wget gnupg -yqq
# Install phive
- wget -O phive.phar https://phar.io/releases/phive.phar
- wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc
- gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79
- gpg --verify phive.phar.asc phive.phar
- chmod +x phive.phar
- mv phive.phar /usr/local/bin/phive
# install phpab
- phive install phpab --global --trust-gpg-keys 0x2A8299CE842DD38C
script:
- make tar
rules:
- if: $CI_COMMIT_BRANCH
package:
extends: .prepare
stage: package
script:
- make redist
- mkdir -p package/$CI_COMMIT_REF_NAME
- cp $PACKAGE_PATH package/$CI_COMMIT_REF_NAME/
artifacts:
paths:
- package/$CI_COMMIT_REF_NAME/build.tar.gz
rules:
- if: $CI_COMMIT_TAG
release:
image: php:8.1
before_script:
# Install some stuff that the image doesn't come with
- apt update -yqq
- apt install git libpq-dev libzip-dev zip make wget gnupg -yqq
# Install phive
- wget -O phive.phar https://phar.io/releases/phive.phar
- wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc
- gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79
- gpg --verify phive.phar.asc phive.phar
- chmod +x phive.phar
- mv phive.phar /usr/local/bin/phive
# install phpab
- phive install phpab --global --trust-gpg-keys 0x2A8299CE842DD38C
extends: .prepare
stage: release
script:
- make redist
- mkdir ncc_$CI_COMMIT_TAG
@ -50,7 +58,7 @@ release:
ncc-docker:
image: docker:latest
stage: build
stage: docker-build
services:
- docker:dind
before_script:
@ -65,7 +73,7 @@ ncc-docker:
ncc-docker-debian:
image: docker:latest
stage: build
stage: docker-build
services:
- docker:dind
before_script:
@ -76,4 +84,4 @@ ncc-docker-debian:
rules:
- if: $CI_COMMIT_BRANCH == 'master'
exists:
- Dockerfile.debian
- Dockerfile.debian