fix: update ci to use new ci-template with semantic-release

This commit is contained in:
2025-12-10 18:49:10 +01:00
parent 4727fcc287
commit 7b72383876
3 changed files with 23 additions and 34 deletions

View File

@@ -1,33 +1,15 @@
stages:
- build
- release
# yaml-language-server: $schema=https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json
variables:
SKIP_TESTS: "true"
build-job:
stage: build
include:
- project: oceanbox/gitlab-ci
ref: v5.0
file: Deployment.gitlab-ci.yml
inputs:
project-name: fornix
project-dir: ""
dockerize-fornix:
tags:
- nix
script:
- echo "Building..."
- nix-build -A default
- echo "Build done."
release-job:
stage: release
tags:
- nix
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:debug-$CI_COMMIT_SHORT_SHA
- if: $CI_COMMIT_TAG
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
script:
- echo "Building container..."
- nix-build -A container
- echo "Deploying application..."
- echo "$CI_REGISTRY_PASSWORD" | skopeo login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
- skopeo copy --insecure-policy docker-archive:result docker://$IMAGE_TAG
- echo "Container successfully released."

View File

@@ -84,6 +84,14 @@ in
container
;
packages = {
fornix = server;
};
containers = {
fornix = container;
};
checks = {
pre-commit = import ./nix/pre-commit.nix;
};

View File

@@ -12,7 +12,6 @@ let tryGetEnv =
let env = defaultArg (tryGetEnv "APP_ENV") "dev"
let baseUrl =
match env with
// TODO - add actual production URL?
| "prod" -> ""
| _ -> "http://oceanbox.ddev.site"
match env with
// TODO - add actual production URL?
| _ -> "http://drupal.drupal.svc.cluster.local"