From 323ff67badfc46ad638d75f059d60d9425ccb2fa Mon Sep 17 00:00:00 2001 From: vnugent Date: Sun, 10 Mar 2024 15:50:07 -0400 Subject: ci(server): Conainerize and add vncache server packages --- plugins/ObjectCacheServer/Taskfile.yaml | 88 +++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 plugins/ObjectCacheServer/Taskfile.yaml (limited to 'plugins/ObjectCacheServer/Taskfile.yaml') diff --git a/plugins/ObjectCacheServer/Taskfile.yaml b/plugins/ObjectCacheServer/Taskfile.yaml new file mode 100644 index 0000000..a339359 --- /dev/null +++ b/plugins/ObjectCacheServer/Taskfile.yaml @@ -0,0 +1,88 @@ +# https://taskfile.dev + +#Called by the vnbuild system to produce builds for my website +#https://www.vaughnnugent.com/resources/software + +#This taskfile is called from the root of a project that is being built +#and the purpose of this taskfile is to package up the output of a build +#from the solution file, and package it up into a tgz files for distribution + +version: '3' + +vars: + TARGET: '{{.USER_WORKING_DIR}}/bin' + RELEASE_DIR: "./bin/release/{{.TARGET_FRAMEWORK}}/publish" + SOURCE_OUT: "{{.USER_WORKING_DIR}}/bin/source" + +includes: + ci: + taskfile: server/taskfile.yaml + dir: server/ #must execute from the server directory + optional: true + +tasks: + + #called by ci to build the output + build: + cmds: + - task: ci:build + + #when build succeeds, archive the output into a tgz + postbuild_success: + dir: '{{.USER_WORKING_DIR}}' + cmds: + #pack up source code + - task: packsource + + #run post in debug mode + - task: postbuild + vars: { BUILD_MODE: debug } + + #remove uncessary files from the release dir + - powershell -Command "Get-ChildItem -Recurse '{{.RELEASE_DIR}}/' -Include *.pdb,*.xml | Remove-Item" + + #run post in release mode + - task: postbuild + vars: { BUILD_MODE: release } + + - task: ci:postbuild_success + + + postbuild_failed: + dir: '{{.USER_WORKING_DIR}}' + cmds: + - echo "postbuild failed {{.PROJECT_NAME}}" + + + postbuild: + dir: '{{.USER_WORKING_DIR}}' + internal: true + vars: + #the build output directory + BUILD_OUT: "{{.USER_WORKING_DIR}}/bin/{{.BUILD_MODE}}/{{.TARGET_FRAMEWORK}}/publish" + + cmds: + + #copy license and readme to target + - cd .. && powershell -Command "Copy-Item -Path ./build.readme.md -Destination '{{.BUILD_OUT}}/readme.md'" + + #tar outputs + - cd "{{.BUILD_OUT}}" && tar -czf "{{.TARGET}}/{{.BUILD_MODE}}.tgz" . + + packsource: + dir: '{{.USER_WORKING_DIR}}' + internal: true + cmds: + #copy source code to target + - powershell -Command "Get-ChildItem -Include *.cs,*.csproj -Recurse | Where { \$_.FullName -notlike '*\obj\*' -and \$_.FullName -notlike '*\bin\*' } | Resolve-Path -Relative | tar --files-from - -czf '{{.TARGET}}/src.tgz'" + + +#Remove the output dirs on clean + clean: + dir: '{{.USER_WORKING_DIR}}' + cmds: + - for: [ 'bin/', 'obj/' ] + cmd: powershell Remove-Item -Recurse '{{.ITEM}}' + ignore_error: true + + - task: ci:clean -- cgit