Updated .gitlab-ci.yml
This commit is contained in:
parent
7ef3bd0e8b
commit
618f49dec6
1 changed files with 47 additions and 39 deletions
|
@ -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:
|
build:
|
||||||
image: php:8.1
|
extends: .prepare
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- make tar
|
||||||
|
|
||||||
before_script:
|
package:
|
||||||
# Install some stuff that the image doesn't come with
|
extends: .prepare
|
||||||
- apt update -yqq
|
stage: package
|
||||||
- apt install git libpq-dev libzip-dev zip make wget gnupg -yqq
|
script:
|
||||||
|
- make redist
|
||||||
# Install phive
|
- mkdir -p package/$CI_COMMIT_REF_NAME
|
||||||
- wget -O phive.phar https://phar.io/releases/phive.phar
|
- cp $PACKAGE_PATH package/$CI_COMMIT_REF_NAME/
|
||||||
- wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc
|
artifacts:
|
||||||
- gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79
|
paths:
|
||||||
- gpg --verify phive.phar.asc phive.phar
|
- package/$CI_COMMIT_REF_NAME/build.tar.gz
|
||||||
- chmod +x phive.phar
|
rules:
|
||||||
- mv phive.phar /usr/local/bin/phive
|
- if: $CI_COMMIT_TAG
|
||||||
|
|
||||||
# install phpab
|
|
||||||
- phive install phpab --global --trust-gpg-keys 0x2A8299CE842DD38C
|
|
||||||
script:
|
|
||||||
- make tar
|
|
||||||
rules:
|
|
||||||
- if: $CI_COMMIT_BRANCH
|
|
||||||
|
|
||||||
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:
|
||||||
|
@ -76,4 +84,4 @@ ncc-docker-debian:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'master'
|
- if: $CI_COMMIT_BRANCH == 'master'
|
||||||
exists:
|
exists:
|
||||||
- Dockerfile.debian
|
- Dockerfile.debian
|
Loading…
Add table
Reference in a new issue