1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-06-24 21:25:23 +00:00
fcast/receivers/electron/.gitlab-ci.yml
2025-05-19 18:08:05 -05:00

98 lines
3.2 KiB
YAML

buildElectronDockerContainer:
stage: buildDockerContainers
image: docker:20.10.16
services:
- docker:20.10.16-dind
tags:
- fcast-instance-runner
before_script:
- cd receivers/electron
script:
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
- docker build -t $CI_REGISTRY/videostreaming/fcast/receiver-electron-dev:latest .
- docker push $CI_REGISTRY/videostreaming/fcast/receiver-electron-dev:latest
when: manual
buildMac:
stage: buildAndDeployElectron
image: ghcr.io/cirruslabs/macos-ventura-xcode@sha256:3380f24929d01a7ac48a554dd242340739387822cf1cb0d96be839ef91b89daf
tags:
- tart-installed
variables:
FCAST_CHANNEL: "stable"
FCAST_CHANNEL_VERSION: "1"
before_script:
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
- sudo security add-certificates -k /Library/Keychains/System.keychain ./.secure_files/developerID_application.cer
- security unlock-keychain -p "admin" ~/Library/Keychains/login.keychain
- security import ./.secure_files/Certificates.p12 -k ~/Library/Keychains/login.keychain -P "$FCAST_CERTIFICATES_PASSWORD" -T /usr/bin/codesign
# Keychain ignores access control, causing to prompt for access and failing in CI environments...: https://stackoverflow.com/a/40039594
- "security set-key-partition-list -S apple-tool:,apple: -s -k admin ~/Library/Keychains/login.keychain"
- mkdir -p ~/.ssh/
- cp ./.secure_files/id_ed25519 ~/.ssh/id_ed25519
- cp ./.secure_files/id_ed25519.pub ~/.ssh/id_ed25519.pub
- chmod 700 ~/.ssh/
- chmod 600 ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519.pub
- cd receivers/electron
script:
- npm install
- npm rebuild
- npm run build
- npm run make -- --platform="darwin" --arch="arm64"
- npm run make -- --platform="darwin" --arch="x64"
- scp -o StrictHostKeyChecking=no -r out/make/* root@$FCAST_DO_RUNNER_IP:/artifacts/
artifacts:
untracked: false
when: on_success
access: all
expire_in: "30 days"
paths:
- receivers/electron/out/make/*
when: manual
buildWindowsAndLinux:
stage: buildAndDeployElectron
image: gitlab.futo.org:5050/videostreaming/fcast/receiver-electron-dev:latest
tags:
- fcast-instance-runner
variables:
FCAST_CHANNEL: "stable"
FCAST_CHANNEL_VERSION: "1"
before_script:
- cd receivers/electron
script:
- npm install
- npm run build
- npm run make -- --platform="win32" --arch="x64"
- npm run make -- --platform="linux" --arch="x64"
- npm run make -- --platform="linux" --arch="arm64"
- cp -rf out/make/* /artifacts/
artifacts:
untracked: false
when: on_success
access: all
expire_in: "30 days"
paths:
- receivers/electron/out/make/*
exclude:
- receivers/electron/out/make/wix/x64/*.w*
when: manual
deploy:
stage: buildAndDeployElectron
image: python:3.12.7-bookworm
tags:
- fcast-instance-runner
# dependencies:
# - buildMac
# - buildWindowsAndLinux
before_script:
- cd receivers/electron
- pip install boto3
- pip install requests
script:
- python3 scripts/deploy/deploy.py
when: manual