summaryrefslogtreecommitdiff
path: root/.crystalintegration.yml
diff options
context:
space:
mode:
authorcrystal <crystal@noreply.codeberg.org>2023-02-06 03:29:43 -0700
committercrystal <crystal@noreply.codeberg.org>2023-02-06 03:29:43 -0700
commit514499661e8a567e26b8281e0f505c8601ff2edf (patch)
tree4c8b0c7dcfaff81efd503d7d190a18b9caadbf49 /.crystalintegration.yml
initial commit
Diffstat (limited to '.crystalintegration.yml')
-rw-r--r--.crystalintegration.yml293
1 files changed, 293 insertions, 0 deletions
diff --git a/.crystalintegration.yml b/.crystalintegration.yml
new file mode 100644
index 0000000..4ce1623
--- /dev/null
+++ b/.crystalintegration.yml
@@ -0,0 +1,293 @@
+platform: linux/amd64
+
+when:
+ event: [ push, tag ]
+
+variables:
+ - &ci_verify_image 'sc.cryxtal.org/ci-img/git-curl-jq:latest'
+ - &golang_image 'golang:1.19'
+ - &forgejo_test_image 'codeberg.org/forgejo/test_env:1.18'
+ - &nodejs_image 'node:lts'
+ - &bin_dl_image 'sc.cryxtal.org/ci-img/bin-dl:latest'
+ - &deb_build_image 'sc.cryxtal.org/ci-img/dh:bullseye'
+ - &deb_test_image_bullseye 'sc.cryxtal.org/ci-img/deb-test-img:bullseye'
+ - &deb_test_image_buster 'sc.cryxtal.org/ci-img/deb-test-img:buster'
+ - &deb_test_image_sid 'sc.cryxtal.org/ci-img/deb-test-img:sid-780e05e2a5'
+ - &deb_test_image_jammy 'sc.cryxtal.org/ci-img/deb-test-img:jammy'
+ - &deb_test_image_focal 'sc.cryxtal.org/ci-img/deb-test-img:focal'
+ - &deb_test_image_kinetic 'sc.cryxtal.org/ci-img/deb-test-img:kinetic'
+ - &build_submodule 'forgejo'
+ - &goproxy_override ''
+ - &goproxy_setup |-
+ if [ -n "$${GOPROXY_OVERRIDE:-}" ]; then
+ export GOPROXY="$${GOPROXY_OVERRIDE}";
+ echo "Using goproxy from goproxy_override \"$${GOPROXY}\"";
+ elif [ -n "$${GOPROXY_DEFAULT:-}" ]; then
+ export GOPROXY="$${GOPROXY_DEFAULT}";
+ echo "Using goproxy from goproxy_default (secret) not displaying";
+ else
+ export GOPROXY="https://proxy.golang.org,direct";
+ echo "No goproxy overrides or defaults given, using \"$${GOPROXY}\"";
+ fi
+
+workspace:
+ base: /go
+ path: src/cryxtal/forgejo-deb
+
+clone:
+ clone-recursive:
+ image: woodpeckerci/plugin-git
+ settings:
+ recursive: true
+
+pipeline:
+ fetch-tags:
+ image: *ci_verify_image
+ pull: true
+ commands:
+ - git config --add safe.directory '*'
+ - git fetch --tags --force
+ - git submodule foreach 'git fetch --tags --force'
+
+ ci-verify:
+ image: *ci_verify_image
+ group: deps
+ environment:
+ BUILD_SUBMODULE: *build_submodule
+ commands:
+ - ./.ci-make.sh ci-verify "$BUILD_SUBMODULE"
+
+ deps-frontend:
+ image: *nodejs_image
+ group: deps
+ environment:
+ BUILD_SUBMODULE: *build_submodule
+ commands:
+ - ./.ci-make.sh submodule-make "$BUILD_SUBMODULE" deps-frontend
+
+ deps-backend:
+ image: *golang_image
+ group: deps
+ environment:
+ BUILD_SUBMODULE: *build_submodule
+ GOPROXY_OVERRIDE: *goproxy_override
+ secrets:
+ - goproxy_default
+ commands:
+ - *goproxy_setup
+ - ./.ci-make.sh submodule-make "$BUILD_SUBMODULE" deps-backend
+
+ tag-pre-condition:
+ image: *ci_verify_image
+ environment:
+ BUILD_SUBMODULE: *build_submodule
+ commands:
+ - cd "$BUILD_SUBMODULE"
+ - git update-ref refs/heads/tag_test $(git rev-parse --verify HEAD)
+
+ security-check:
+ image: *golang_image
+ group: checks
+ environment:
+ BUILD_SUBMODULE: *build_submodule
+ GOPROXY_OVERRIDE: *goproxy_override
+ secrets:
+ - goproxy_default
+ commands:
+ - *goproxy_setup
+ - ./.ci-make.sh submodule-make "$BUILD_SUBMODULE" security-check
+
+ build-frontend:
+ image: *nodejs_image
+ group: checks
+ environment:
+ BUILD_SUBMODULE: *build_submodule
+ commands:
+ - ./.ci-make.sh submodule-make "$BUILD_SUBMODULE" frontend
+
+ checks-backend:
+ image: *forgejo_test_image
+ group: checks
+ environment:
+ BUILD_SUBMODULE: *build_submodule
+ GOPROXY_OVERRIDE: *goproxy_override
+ secrets:
+ - goproxy_default
+ commands:
+ - *goproxy_setup
+ - ./.ci-make.sh submodule-make "$BUILD_SUBMODULE" checks-backend
+
+ download-bin-amd64:
+ image: *bin_dl_image
+ group: build-main
+ commands:
+ - ./.ci-make.sh download-binary forgejo-bin-dl
+ when:
+ event: [ tag ]
+
+ build-forgejo-amd64:
+ image: *golang_image
+ group: build-main
+ environment:
+ BUILD_SUBMODULE: *build_submodule
+ GOSUMDB: sum.golang.org
+ TAGS: bindata
+ GOPROXY_OVERRIDE: *goproxy_override
+ secrets:
+ - goproxy_default
+ commands:
+ - *goproxy_setup
+ - ./.ci-make.sh submodule-build "$BUILD_SUBMODULE" forgejo-bin
+
+ build-forgejo-sqlite-amd64:
+ image: *golang_image
+ environment:
+ BUILD_SUBMODULE: *build_submodule
+ GOSUMDB: sum.golang.org
+ TAGS: bindata sqlite sqlite_unlock_notify
+ GOPROXY_OVERRIDE: *goproxy_override
+ secrets:
+ - goproxy_default
+ commands:
+ - *goproxy_setup
+ - ./.ci-make.sh submodule-build "$BUILD_SUBMODULE" forgejo-sqlite-bin
+
+ package-bullseye:
+ image: *deb_build_image
+ commands:
+ - ./.ci-make.sh package-prep
+ - ./.ci-make.sh package-build
+ - ./.ci-make.sh package-clean
+
+ gen-sha256:
+ image: *ci_verify_image
+ commands:
+ - ./.ci-make.sh pkg-gen-sha256
+ - ./.ci-make.sh preview-sha256
+
+ test-inst-bullseye:
+ image: *deb_test_image_bullseye
+ group: pkg-test-1
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo_*_amd64.deb
+
+ test-inst-bullseye-user:
+ image: *deb_test_image_bullseye
+ group: pkg-test-1
+ commands:
+ - ./.ci-make.sh test-userinst-prep
+ - ./.ci-make.sh install-run-test ./forgejo_*_amd64.deb
+
+ test-inst-bullseye-sqlite:
+ image: *deb_test_image_bullseye
+ group: pkg-test-1
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+
+ test-inst-buster-sqlite:
+ image: *deb_test_image_buster
+ group: pkg-test-1
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+
+ test-inst-sid-sqlite:
+ image: *deb_test_image_sid
+ group: pkg-test-2
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+
+ test-inst-jammy-sqlite:
+ image: *deb_test_image_jammy
+ group: pkg-test-2
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+
+ test-inst-focal-sqlite:
+ image: *deb_test_image_focal
+ group: pkg-test-2
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+
+ test-inst-kinetic-sqlite:
+ image: *deb_test_image_kinetic
+ group: pkg-test-2
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+
+ test-inst-bullseye-bin:
+ image: *deb_test_image_bullseye
+ group: pkg-test-3
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
+ when:
+ event: [ tag ]
+
+ test-inst-buster-bin:
+ image: *deb_test_image_buster
+ group: pkg-test-3
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
+ when:
+ event: [ tag ]
+
+ test-inst-sid-bin:
+ image: *deb_test_image_sid
+ group: pkg-test-3
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
+ when:
+ event: [ tag ]
+
+ test-inst-jammy-bin:
+ image: *deb_test_image_jammy
+ group: pkg-test-4
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
+ when:
+ event: [ tag ]
+
+ test-inst-focal-bin:
+ image: *deb_test_image_focal
+ group: pkg-test-4
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
+ when:
+ event: [ tag ]
+
+ test-inst-kinetic-bin:
+ image: *deb_test_image_kinetic
+ group: pkg-test-4
+ commands:
+ - ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
+ when:
+ event: [ tag ]
+
+ upload-crystalcommit:
+ image: woodpeckerci/plugin-gitea-release
+ group: upload
+ settings:
+ base_url: https://sc.cryxtal.org
+ files:
+ - "*.deb"
+ - "*.deb.sha256"
+ api_key:
+ from_secret: sc_api_key
+ prerelease: true
+ skip_verify: true
+ when:
+ event: [ tag ]
+
+ upload-codeberg:
+ image: woodpeckerci/plugin-gitea-release
+ group: upload
+ settings:
+ base_url: https://codeberg.org
+ files:
+ - "*.deb"
+ - "*.deb.sha256"
+ api_key:
+ from_secret: cb_api_key
+ prerelease: true
+ skip_verify: true
+ when:
+ event: [ tag ]