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