mirror of
https://github.com/sp-tarkov/build.git
synced 2025-02-12 14:50:44 -05:00
Changes Include:
- Adds missing static files - Adds build step to combine and decompress artifacts - Removes some older drone references
This commit is contained in:
parent
eb288c7b46
commit
cbd82e72be
41
.drone.yml
41
.drone.yml
@ -1,41 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: build
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: windows
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: refringe/spt-build-environment:1.0.0
|
|
||||||
commands:
|
|
||||||
- git clone https://dev.sp-tarkov.com/SPT-AKI/Build.git C:\Code
|
|
||||||
- cd C:\Code
|
|
||||||
- git checkout ${DRONE_COMMIT}
|
|
||||||
volumes:
|
|
||||||
- name: code
|
|
||||||
path: C:\Code
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: refringe/spt-build-environment:1.0.0
|
|
||||||
environment:
|
|
||||||
MODULE_DOMAIN:
|
|
||||||
from_secret: MODULE_DOMAIN
|
|
||||||
commands:
|
|
||||||
- cd C:\Code
|
|
||||||
- pwsh -File C:\Code\project\build.ps1 -Tag "${DRONE_TAG}"
|
|
||||||
volumes:
|
|
||||||
- name: code
|
|
||||||
path: C:\Code
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: code
|
|
||||||
temp: {}
|
|
@ -40,7 +40,7 @@ jobs:
|
|||||||
if: needs.check-tag-exists.outputs.proceed == 'true'
|
if: needs.check-tag-exists.outputs.proceed == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: refringe/spt-build-server:0.0.3
|
image: refringe/spt-build-server:0.0.4
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
run: |
|
run: |
|
||||||
@ -105,13 +105,13 @@ jobs:
|
|||||||
build-
|
build-
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
#if: steps.build-cache.outputs.cache-hit != 'true'
|
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd /workspace/refringe/Build/server/project
|
cd /workspace/refringe/Build/server/project
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
- name: Build Server
|
- name: Build Server
|
||||||
#if: steps.build-cache.outputs.cache-hit != 'true'
|
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd /workspace/refringe/Build/server/project
|
cd /workspace/refringe/Build/server/project
|
||||||
BUILD_TYPE="${{ steps.build-type.outputs.build_type }}"
|
BUILD_TYPE="${{ steps.build-type.outputs.build_type }}"
|
||||||
@ -238,3 +238,41 @@ jobs:
|
|||||||
name: launcher-build
|
name: launcher-build
|
||||||
path: /workspace/refringe/Build/launcher/project/Build
|
path: /workspace/refringe/Build/launcher/project/Build
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
|
||||||
|
extract-and-combine:
|
||||||
|
needs: [build-server, build-modules, build-launcher]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: refringe/spt-build-server:0.0.4
|
||||||
|
steps:
|
||||||
|
- name: Create combined build directory
|
||||||
|
run: mkdir -p /workspace/refringe/Build/combined-build
|
||||||
|
|
||||||
|
- name: Download Server Build Archive
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: server-build
|
||||||
|
path: /workspace/refringe/Build/combined-build/
|
||||||
|
|
||||||
|
- name: Download Modules Build Archive
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: modules-build
|
||||||
|
path: /workspace/refringe/Build/combined-build/
|
||||||
|
|
||||||
|
- name: Download Launcher Build Archive
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: launcher-build
|
||||||
|
path: /workspace/refringe/Build/combined-build/
|
||||||
|
|
||||||
|
- name: Extract Archives
|
||||||
|
run: |
|
||||||
|
cd /workspace/refringe/Build/combined-build
|
||||||
|
for archive in *.zip; do
|
||||||
|
echo "Extracting $archive..."
|
||||||
|
7z x "$archive" -aoa
|
||||||
|
rm "$archive"
|
||||||
|
done
|
||||||
|
tree /workspace/refringe/Build/combined-build
|
||||||
|
shell: bash
|
||||||
|
4
LICENSE
4
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2023 Tyler Brownell
|
Copyright (c) 2024 Refringe <me@refringe.com>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
52
README.md
52
README.md
@ -1,14 +1,16 @@
|
|||||||
# SPT Build Project - CI/CD Process
|
# SPT Build Project - CI/CD Process
|
||||||
|
|
||||||
This document outlines the Continuous Integration and Continuous Deployment (CI/CD) setup for the `SPT-AKI/Build` project, which automates the build and release process for three interconnected repositories: `SPT-AKI/Modules`, `SPT-AKI/Server`, and `SPT-AKI/Launcher`. The process is orchestrated using Drone CI with Gitea and relies on a Windows Docker runner to execute PowerShell scripts for building and packaging the projects.
|
This document outlines the Continuous Integration and Continuous Deployment (CI/CD) setup for the `SPT-AKI/Build` project, which automates the build and release process for three interconnected repositories: `SPT-AKI/Modules`, `SPT-AKI/Server`, and `SPT-AKI/Launcher`. The process is orchestrated using Gitea Actions.
|
||||||
|
|
||||||
## Project Repositories
|
## Project Repositories
|
||||||
|
|
||||||
|
TODO: Update for Gitea
|
||||||
|
|
||||||
Each of the three project repositories (`SPT-AKI/Modules`, `SPT-AKI/Server`, `SPT-AKI/Launcher`) requires a `.drone.yml` file configured to trigger a build in this `SPT-AKI/Build` repository using the Drone downstream plugin upon a new tag push (e.g., `v3.8.0`). The contents of the `.drone.yml` file can be found in `project-trigger.yml`. Note that the file must be present and named `.drone.yml` to trigger the build process.
|
Each of the three project repositories (`SPT-AKI/Modules`, `SPT-AKI/Server`, `SPT-AKI/Launcher`) requires a `.drone.yml` file configured to trigger a build in this `SPT-AKI/Build` repository using the Drone downstream plugin upon a new tag push (e.g., `v3.8.0`). The contents of the `.drone.yml` file can be found in `project-trigger.yml`. Note that the file must be present and named `.drone.yml` to trigger the build process.
|
||||||
|
|
||||||
### Build Process
|
### Build Process
|
||||||
|
|
||||||
This repository's `.drone.yml` initiates the CI/CD process by running a PowerShell script `build.ps1` on a Windows Docker runner. The PowerShell script performs the following actions:
|
This repository initiates the CI/CD build process by performing the following actions:
|
||||||
|
|
||||||
1. Checks if the passed in tag exists in all three project repositories.
|
1. Checks if the passed in tag exists in all three project repositories.
|
||||||
1. Clones the tagged commits of each repository.
|
1. Clones the tagged commits of each repository.
|
||||||
@ -17,53 +19,13 @@ This repository's `.drone.yml` initiates the CI/CD process by running a PowerShe
|
|||||||
1. Copies the release file to a web-accessible location.
|
1. Copies the release file to a web-accessible location.
|
||||||
1. Release notifications (creates a Gitea release, sends a Discord notification, etc.)
|
1. Release notifications (creates a Gitea release, sends a Discord notification, etc.)
|
||||||
|
|
||||||
## Drone Runner Configuration
|
## Gitea Runner Configuration
|
||||||
|
|
||||||
Drone CI Runner Requirements:
|
TODO: Update for Gitea
|
||||||
- Windows Server 2022 Host
|
|
||||||
- Docker Community Edition (CE)
|
|
||||||
|
|
||||||
### Install Docker CE
|
|
||||||
|
|
||||||
Docker CE needs to be installed (not Docker Desktop). The following steps outline the installation process for Windows Server 2022:
|
|
||||||
|
|
||||||
To install Docker CE on Windows Server 2022, follow these steps:
|
|
||||||
|
|
||||||
1. Open `Windows Server Manager`
|
|
||||||
1. Select `Manage`
|
|
||||||
1. Select `Add Roles and Features`
|
|
||||||
1. Click `Next` on the `Before You Begin` page
|
|
||||||
1. Select `Role-based or feature-based installation`
|
|
||||||
1. Select the name of the server where the feature will be installed and click `Next`
|
|
||||||
1. Select `Hyper-V` and click `Next`
|
|
||||||
1. Select `Containers` and click `Next`
|
|
||||||
1. Click `Install` on the `Confirm installation selections` page
|
|
||||||
1. Click `Close` on the `Installation progress` page
|
|
||||||
1. Open a PowerShell terminal (as admin) and run the following commands to install Docker CE:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
# Download install script
|
|
||||||
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -o install-docker-ce.ps1
|
|
||||||
|
|
||||||
# Run install script
|
|
||||||
.\install-docker-ce.ps1
|
|
||||||
|
|
||||||
# Test Docker installation
|
|
||||||
Get-Service Docker
|
|
||||||
```
|
|
||||||
|
|
||||||
### Run the Runner
|
### Run the Runner
|
||||||
|
|
||||||
Use the command below to start the Drone CI Runner. But first...
|
TODO: Update for Gitea
|
||||||
- Replace the `DRONE_RPC_HOST` value with the host of the Drone server that should be connected to for builds.
|
|
||||||
- Replace the `DRONE_RPC_SECRET` value with the Drone server secret.
|
|
||||||
- Replace the `DRONE_RUNNER_NAME` value with a unique name for the runner.
|
|
||||||
- Replace the `DRONE_UI_PASSWORD` value with a password to access the web runner UI.
|
|
||||||
- Adjust `DRONE_RUNNER_CAPACITY` to the number of builds that should be allowed to run at once.
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
docker run --detach --volume=//./pipe/docker_engine://./pipe/docker_engine --env=DRONE_RPC_PROTO=https --env=DRONE_RPC_HOST=example.com --env=DRONE_RPC_SECRET=secret --env=DRONE_RUNNER_CAPACITY=2 --env=DRONE_RUNNER_NAME=example --env=DRONE_UI_DISABLE=false --env=DRONE_UI_USERNAME=root --env=DRONE_UI_PASSWORD=password --publish=3000:3000 --restart=always --name=runner drone/drone-runner-docker:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
## Module Requirements
|
## Module Requirements
|
||||||
|
|
||||||
|
@ -1,19 +1 @@
|
|||||||
kind: pipeline
|
# TODO: Gitea Version
|
||||||
type: docker
|
|
||||||
name: trigger-spt-build
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: trigger-build-check
|
|
||||||
image: plugins/downstream
|
|
||||||
settings:
|
|
||||||
repositories:
|
|
||||||
- SPT-AKI/Build
|
|
||||||
server: https://drone.sp-tarkov.com
|
|
||||||
token:
|
|
||||||
from_secret: gitea_token
|
|
||||||
when:
|
|
||||||
event: tag
|
|
||||||
|
@ -148,3 +148,4 @@ Type = Application
|
|||||||
# Setting type: String
|
# Setting type: String
|
||||||
# Default value: .cctor
|
# Default value: .cctor
|
||||||
Method = .cctor
|
Method = .cctor
|
||||||
|
|
@ -36,3 +36,4 @@ Hide single sections = false
|
|||||||
# Setting type: Boolean
|
# Setting type: Boolean
|
||||||
# Default value: true
|
# Default value: true
|
||||||
Plugin collapsed default = true
|
Plugin collapsed default = true
|
||||||
|
|
BIN
project/static/BepInEx/core/0Harmony.dll
Normal file
BIN
project/static/BepInEx/core/0Harmony.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/0Harmony20.dll
Normal file
BIN
project/static/BepInEx/core/0Harmony20.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/BepInEx.Harmony.dll
Normal file
BIN
project/static/BepInEx/core/BepInEx.Harmony.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/BepInEx.Preloader.dll
Normal file
BIN
project/static/BepInEx/core/BepInEx.Preloader.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/BepInEx.dll
Normal file
BIN
project/static/BepInEx/core/BepInEx.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/HarmonyXInterop.dll
Normal file
BIN
project/static/BepInEx/core/HarmonyXInterop.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/Mono.Cecil.Mdb.dll
Normal file
BIN
project/static/BepInEx/core/Mono.Cecil.Mdb.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/Mono.Cecil.Pdb.dll
Normal file
BIN
project/static/BepInEx/core/Mono.Cecil.Pdb.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/Mono.Cecil.Rocks.dll
Normal file
BIN
project/static/BepInEx/core/Mono.Cecil.Rocks.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/Mono.Cecil.dll
Normal file
BIN
project/static/BepInEx/core/Mono.Cecil.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/MonoMod.RuntimeDetour.dll
Normal file
BIN
project/static/BepInEx/core/MonoMod.RuntimeDetour.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/core/MonoMod.Utils.dll
Normal file
BIN
project/static/BepInEx/core/MonoMod.Utils.dll
Normal file
Binary file not shown.
BIN
project/static/BepInEx/plugins/spt/ConfigurationManager.dll
Normal file
BIN
project/static/BepInEx/plugins/spt/ConfigurationManager.dll
Normal file
Binary file not shown.
BIN
project/static/winhttp.dll
Normal file
BIN
project/static/winhttp.dll
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user