further work on CI: compile stage
This commit is contained in:
parent
ca5fec6776
commit
d261ba1de4
@ -7,11 +7,14 @@ stages:
|
||||
|
||||
image: node:latest
|
||||
|
||||
variables:
|
||||
APP_NAME: "radio"
|
||||
|
||||
compiling:
|
||||
stage: compiling
|
||||
script:
|
||||
- apt update
|
||||
- DEBIAN_FRONTEND="noninteractive" apt install -y php gettext
|
||||
- DEBIAN_FRONTEND="noninteractive" apt install -y gettext php php-simplexml
|
||||
- npm install
|
||||
- make build-js
|
||||
- make translations
|
||||
@ -27,11 +30,11 @@ testing:
|
||||
stage: testing
|
||||
image: nextcloud:fpm
|
||||
script:
|
||||
- cp -r $(pwd) /usr/src/nextcloud/apps/radio
|
||||
- cp -r $(pwd) /usr/src/nextcloud/apps/${APP_NAME}
|
||||
- php /usr/src/nextcloud/occ maintenance:install --database "sqlite" --admin-user "admin" --admin-pass "password"
|
||||
- php /usr/src/nextcloud/occ app:enable radio
|
||||
- php /usr/src/nextcloud/occ app:enable ${APP_NAME}
|
||||
- php /usr/src/nextcloud/occ maintenance:mode --off
|
||||
- php /usr/src/nextcloud/occ app:check-code radio
|
||||
- php /usr/src/nextcloud/occ app:check-code ${APP_NAME}
|
||||
|
||||
packaging:
|
||||
stage: packaging
|
||||
@ -44,7 +47,7 @@ packaging:
|
||||
- krankerl package
|
||||
artifacts:
|
||||
paths:
|
||||
- build/artifacts/radio.tar.gz
|
||||
- build/artifacts/${APP_NAME}.tar.gz
|
||||
|
||||
signing:
|
||||
stage: signing
|
||||
@ -56,14 +59,14 @@ signing:
|
||||
- echo "-----BEGIN CERTIFICATE-----" > sign.crt
|
||||
- echo $SIGN_CRT | tr " " "\n" >> sign.crt
|
||||
- echo "-----END CERTIFICATE-----" >> sign.crt
|
||||
- tar xvf build/artifacts/radio.tar.gz
|
||||
- php /usr/src/nextcloud/occ integrity:sign-app --path=$(pwd)/radio --privateKey=$(pwd)/sign.key --certificate=$(pwd)/sign.crt
|
||||
- tar -czvf build/artifacts/radio.tar.gz radio
|
||||
- rm -r sign.key sign.crt radio
|
||||
- tar xvf build/artifacts/${APP_NAME}.tar.gz
|
||||
- php /usr/src/nextcloud/occ integrity:sign-app --path=$(pwd)/${APP_NAME} --privateKey=$(pwd)/sign.key --certificate=$(pwd)/sign.crt
|
||||
- tar -czvf build/artifacts/${APP_NAME}.tar.gz ${APP_NAME}
|
||||
- rm -r sign.key sign.crt ${APP_NAME}
|
||||
- echo CI_PACKAGING_JOBID="${CI_JOB_ID}" > $CI_PROJECT_DIR/variables.env
|
||||
artifacts:
|
||||
paths:
|
||||
- build/artifacts/radio.tar.gz
|
||||
- build/artifacts/${APP_NAME}.tar.gz
|
||||
expire_in: never
|
||||
reports:
|
||||
dotenv: variables.env
|
||||
@ -78,4 +81,4 @@ publishing:
|
||||
- >
|
||||
release-cli create --name "v$CI_COMMIT_TAG" --description "$EXTRA_DESCRIPTION"
|
||||
--tag-name $CI_COMMIT_TAG --ref $CI_COMMIT_SHA
|
||||
--assets-link "{\"name\":\"radio\",\"url\":\"https://git.project-insanity.org/onny/nextcloud-app-radio/-/jobs/${CI_PACKAGING_JOBID}/artifacts/raw/build/artifacts/radio.tar.gz\",\"link_type\":\"other\"}"
|
||||
--assets-link "{\"name\":\"${APP_NAME}\",\"url\":\"https://git.project-insanity.org/onny/nextcloud-app-radio/-/jobs/${CI_PACKAGING_JOBID}/artifacts/raw/build/artifacts/${APP_NAME}.tar.gz\",\"link_type\":\"other\"}"
|
||||
|
Loading…
Reference in New Issue
Block a user