From 89aefe03fe554d4decf49d46950c6b3dfc0cd950 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 14:54:02 +0000 Subject: [PATCH 01/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..64b372d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,49 @@ +# This file is a template, and might need editing before it works on your project. +# This is a sample GitLab CI/CD configuration file that should run without any modifications. +# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts, +# it uses echo commands to simulate the pipeline execution. +# +# A pipeline is composed of independent jobs that run scripts, grouped into stages. +# Stages run in sequential order, but jobs within stages run in parallel. +# +# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages +# +# You can copy and paste this template into a new `.gitlab-ci.yml` file. +# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword. +# +# To contribute improvements to CI/CD templates, please follow the Development guide at: +# https://docs.gitlab.com/ee/development/cicd/templates.html +# This specific template is located at: +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml + +stages: # List of stages for jobs, and their order of execution + - build + - test + - deploy + +build-job: # This job runs in the build stage, which runs first. + stage: build + script: + - echo "Compiling the code..." + - echo "Compile complete." + +unit-test-job: # This job runs in the test stage. + stage: test # It only starts when the job in the build stage completes successfully. + script: + - echo "Running unit tests... This will take about 60 seconds." + - sleep 60 + - echo "Code coverage is 90%" + +lint-test-job: # This job also runs in the test stage. + stage: test # It can run at the same time as unit-test-job (in parallel). + script: + - echo "Linting code... This will take about 10 seconds." + - sleep 10 + - echo "No lint issues found." + +deploy-job: # This job runs in the deploy stage. + stage: deploy # It only runs when *both* jobs in the test stage complete successfully. + environment: production + script: + - echo "Deploying application..." + - echo "Application successfully deployed." From 3bcc4f334e33ba0a8e3289199e353ed1f0644d9b Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 15:12:16 +0000 Subject: [PATCH 02/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 149 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 109 insertions(+), 40 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64b372d..bbb223e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,49 +1,118 @@ -# This file is a template, and might need editing before it works on your project. -# This is a sample GitLab CI/CD configuration file that should run without any modifications. -# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts, -# it uses echo commands to simulate the pipeline execution. -# -# A pipeline is composed of independent jobs that run scripts, grouped into stages. -# Stages run in sequential order, but jobs within stages run in parallel. -# -# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages -# -# You can copy and paste this template into a new `.gitlab-ci.yml` file. -# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword. -# # To contribute improvements to CI/CD templates, please follow the Development guide at: # https://docs.gitlab.com/ee/development/cicd/templates.html # This specific template is located at: -# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/dotNET-Core.gitlab-ci.yml -stages: # List of stages for jobs, and their order of execution - - build - - test - - deploy +# This is a simple example illustrating how to build and test .NET Core project +# with GitLab Continuous Integration / Continuous Delivery. +# +# ### Specify the Docker image +# +# Instead of installing .NET Core SDK manually, a docker image is used +# with already pre-installed .NET Core SDK. +# +# The 'latest' tag targets the latest available version of .NET Core SDK image. +# If preferred, you can explicitly specify version of .NET Core (e.g. using '2.2-sdk' tag). +# +# See other available tags for .NET Core: https://hub.docker.com/_/microsoft-dotnet +# Learn more about Docker tags: https://docs.docker.com/glossary/?term=tag +# and the Docker itself: https://opensource.com/resources/what-docker +image: mcr.microsoft.com/dotnet/sdk:latest -build-job: # This job runs in the build stage, which runs first. +# ### Define variables +# +variables: + # 1) Name of directory where restore and build objects are stored. + OBJECTS_DIRECTORY: 'obj' + # 2) Name of directory used for keeping restored dependencies. + NUGET_PACKAGES_DIRECTORY: '.nuget' + # 3) A relative path to the source code from project repository root. + # NOTE: Please edit this path so it matches the structure of your project! + SOURCE_CODE_PATH: '*/*/' + +# ### Define global cache rule +# +# Before building the project, all dependencies (e.g. third-party NuGet packages) +# must be restored. Jobs on GitLab.com's Shared Runners are executed on autoscaled machines. +# +# Each machine is used only once (for security reasons) and after that is removed. +# This means that, before every job, a dependency restore must be performed +# because restored dependencies are removed along with machines. Fortunately, +# GitLab provides cache mechanism with the aim of keeping restored dependencies +# for other jobs. +# +# This example shows how to configure cache to pass over restored +# dependencies for re-use. +# +# With global cache rule, cached dependencies will be downloaded before every job +# and then unpacked to the paths as specified below. +cache: + # Per-stage and per-branch caching. + key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG" + paths: + # Specify three paths that should be cached: + # + # 1) Main JSON file holding information about package dependency tree, packages versions, + # frameworks etc. It also holds information where to the dependencies were restored. + - '$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/project.assets.json' + # 2) Other NuGet and MSBuild related files. Also needed. + - '$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/*.csproj.nuget.*' + # 3) Path to the directory where restored dependencies are kept. + - '$NUGET_PACKAGES_DIRECTORY' + # + # 'pull-push' policy means that latest cache will be downloaded (if it exists) + # before executing the job, and a newer version will be uploaded afterwards. + # Such a setting saves time when there are no changes in referenced third-party + # packages. + # + # For example, if you run a pipeline with changes in your code, + # but with no changes within third-party packages which your project is using, + # then project restore will happen quickly as all required dependencies + # will already be there — unzipped from cache. + + # 'pull-push' policy is the default cache policy, you do not have to specify it explicitly. + policy: pull-push + +# ### Restore project dependencies +# +# NuGet packages by default are restored to '.nuget/packages' directory +# in the user's home directory. That directory is out of scope of GitLab caching. +# +# To get around this, a custom path can be specified using the '--packages ' option +# for 'dotnet restore' command. In this example, a temporary directory is created +# in the root of project repository, so its content can be cached. +# +# Learn more about GitLab cache: https://docs.gitlab.com/ee/ci/caching/index.html +before_script: + - 'dotnet restore --packages $NUGET_PACKAGES_DIRECTORY' + +build: stage: build + # ### Build all projects discovered from solution file. + # + # Note: this will fail if you have any projects in your solution that are not + # .NET Core-based projects (e.g. WCF service), which is based on .NET Framework, + # not .NET Core. In this scenario, you will need to build every .NET Core-based + # project by explicitly specifying a relative path to the directory + # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). + # Only one project path can be passed as a parameter to 'dotnet build' command. script: - - echo "Compiling the code..." - - echo "Compile complete." + - 'dotnet build --no-restore' -unit-test-job: # This job runs in the test stage. - stage: test # It only starts when the job in the build stage completes successfully. - script: - - echo "Running unit tests... This will take about 60 seconds." - - sleep 60 - - echo "Code coverage is 90%" +#tests: +# stage: test + # ### Run the tests + # + # You can either run tests for all test projects that are defined in your solution + # with 'dotnet test' or run tests only for specific project by specifying + # a relative path to the directory where it is located (e.g. 'dotnet test ./test/UnitTests'). + # + # You may want to define separate testing jobs for different types of testing + # (e.g. integration tests, unit tests etc). +# script: +# - 'dotnet test --no-restore' -lint-test-job: # This job also runs in the test stage. - stage: test # It can run at the same time as unit-test-job (in parallel). - script: - - echo "Linting code... This will take about 10 seconds." - - sleep 10 - - echo "No lint issues found." - -deploy-job: # This job runs in the deploy stage. - stage: deploy # It only runs when *both* jobs in the test stage complete successfully. - environment: production - script: - - echo "Deploying application..." - - echo "Application successfully deployed." +#deploy: +# stage: deploy +# script: echo "Define your deployment script!" +# environment: production From f718e863e32b308a4dd0b7e75141ca3ca784c89b Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 15:22:58 +0000 Subject: [PATCH 03/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bbb223e..ec6e935 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ variables: NUGET_PACKAGES_DIRECTORY: '.nuget' # 3) A relative path to the source code from project repository root. # NOTE: Please edit this path so it matches the structure of your project! - SOURCE_CODE_PATH: '*/*/' + SOURCE_CODE_PATH: 'Source/' # ### Define global cache rule # From 97cd357cf7e8e98aaa1232d405a31d911900b641 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 15:27:17 +0000 Subject: [PATCH 04/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec6e935..0e0b180 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,6 +84,7 @@ cache: # # Learn more about GitLab cache: https://docs.gitlab.com/ee/ci/caching/index.html before_script: + - 'cd $SOURCE_CODE_PATH' - 'dotnet restore --packages $NUGET_PACKAGES_DIRECTORY' build: From 76bd1bdabfe5ea4290982ff129b78aa61326476a Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 16:03:06 +0000 Subject: [PATCH 05/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0e0b180..2cb9b48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,6 +98,7 @@ build: # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). # Only one project path can be passed as a parameter to 'dotnet build' command. script: + - 'curl --create-dirs "https://gitgud.io/jikulopo/rjw/-/raw/1.5-test/1.5/Assemblies/RJW.dll" -o ../../rjw/1.5/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From b83b0c0ecdadeb2a43fe6a6c628a8fab768b6be6 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 16:13:33 +0000 Subject: [PATCH 06/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2cb9b48..c1419fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,6 +99,7 @@ build: # Only one project path can be passed as a parameter to 'dotnet build' command. script: - 'curl --create-dirs "https://gitgud.io/jikulopo/rjw/-/raw/1.5-test/1.5/Assemblies/RJW.dll" -o ../../rjw/1.5/Assemblies/RJW.dll' + - 'ls ../../rjw/1.5/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From 6bc7a58be1e4c2638f016b32f571181cc184b7e0 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 16:25:22 +0000 Subject: [PATCH 07/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1419fb..e597d8d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,8 +98,8 @@ build: # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). # Only one project path can be passed as a parameter to 'dotnet build' command. script: - - 'curl --create-dirs "https://gitgud.io/jikulopo/rjw/-/raw/1.5-test/1.5/Assemblies/RJW.dll" -o ../../rjw/1.5/Assemblies/RJW.dll' - - 'ls ../../rjw/1.5/Assemblies/RJW.dll' + - 'curl --create-dirs "https://gitgud.io/jikulopo/rjw/-/raw/1.5-test/1.5/Assemblies/RJW.dll" -o ../../../rjw/1.5/Assemblies/RJW.dll' + - 'ls ../../../rjw/1.5/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From 57f3feae8bab0fba20769858368f9ab9583b62aa Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 16:46:34 +0000 Subject: [PATCH 08/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e597d8d..64c5696 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,8 +98,9 @@ build: # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). # Only one project path can be passed as a parameter to 'dotnet build' command. script: + - 'ls -l ../../../rjw/1.5/Assemblies/RJW.dll' - 'curl --create-dirs "https://gitgud.io/jikulopo/rjw/-/raw/1.5-test/1.5/Assemblies/RJW.dll" -o ../../../rjw/1.5/Assemblies/RJW.dll' - - 'ls ../../../rjw/1.5/Assemblies/RJW.dll' + - 'ls -l ../../../rjw/1.5/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From d598f33e74c6b79b22fe557d6ec2d5f391ef48f4 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 17:13:13 +0000 Subject: [PATCH 09/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64c5696..a867186 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,9 +98,9 @@ build: # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). # Only one project path can be passed as a parameter to 'dotnet build' command. script: - - 'ls -l ../../../rjw/1.5/Assemblies/RJW.dll' - - 'curl --create-dirs "https://gitgud.io/jikulopo/rjw/-/raw/1.5-test/1.5/Assemblies/RJW.dll" -o ../../../rjw/1.5/Assemblies/RJW.dll' - - 'ls -l ../../../rjw/1.5/Assemblies/RJW.dll' + - 'ls -l ../../rjw/1.5/Assemblies/RJW.dll' + - 'curl --create-dirs "https://gitgud.io/jikulopo/rjw/-/raw/1.5-test/1.5/Assemblies/RJW.dll" -o ../../rjw/1.5/Assemblies/RJW.dll' + - 'ls -l ../../rjw/1.5/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From 45e84a83fcc0eda16ef33f0604bf7740a736d38d Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 17:43:57 +0000 Subject: [PATCH 10/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a867186..73c021d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,9 +98,7 @@ build: # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). # Only one project path can be passed as a parameter to 'dotnet build' command. script: - - 'ls -l ../../rjw/1.5/Assemblies/RJW.dll' - - 'curl --create-dirs "https://gitgud.io/jikulopo/rjw/-/raw/1.5-test/1.5/Assemblies/RJW.dll" -o ../../rjw/1.5/Assemblies/RJW.dll' - - 'ls -l ../../rjw/1.5/Assemblies/RJW.dll' + - 'curl --create-dirs "https://gitgud.io/jikulopo/rjw/-/raw/1.5-test/1.5/Assemblies/RJW.dll" -o ../../rjw/1.4/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From 79a3dc684b2c7468a40b69eda58c90dc3bcb3d4c Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 18:01:08 +0000 Subject: [PATCH 11/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 73c021d..3bb83f0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ image: mcr.microsoft.com/dotnet/sdk:latest # variables: # 1) Name of directory where restore and build objects are stored. - OBJECTS_DIRECTORY: 'obj' + OBJECTS_DIRECTORY: 'IdeologyAddon/obj' # 2) Name of directory used for keeping restored dependencies. NUGET_PACKAGES_DIRECTORY: '.nuget' # 3) A relative path to the source code from project repository root. @@ -98,7 +98,7 @@ build: # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). # Only one project path can be passed as a parameter to 'dotnet build' command. script: - - 'curl --create-dirs "https://gitgud.io/jikulopo/rjw/-/raw/1.5-test/1.5/Assemblies/RJW.dll" -o ../../rjw/1.4/Assemblies/RJW.dll' + - 'curl --create-dirs "$RJW_DLL_URL" -o ../../rjw/1.4/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From b2fae1c39ca4468ad3d47fd68cce2f14f609ec5c Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 18:05:08 +0000 Subject: [PATCH 12/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3bb83f0..684ed48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,6 +98,7 @@ build: # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). # Only one project path can be passed as a parameter to 'dotnet build' command. script: + - 'echo $RJW_DLL_URL' - 'curl --create-dirs "$RJW_DLL_URL" -o ../../rjw/1.4/Assemblies/RJW.dll' - 'dotnet build --no-restore' From 332a65eb7d6e3a92a89b5a093f0b3d31e078258a Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 18:06:38 +0000 Subject: [PATCH 13/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 684ed48..e778595 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,7 +99,7 @@ build: # Only one project path can be passed as a parameter to 'dotnet build' command. script: - 'echo $RJW_DLL_URL' - - 'curl --create-dirs "$RJW_DLL_URL" -o ../../rjw/1.4/Assemblies/RJW.dll' + - 'curl --create-dirs $RJW_DLL_URL -o ../../rjw/1.4/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From d39a01a96280e6ea5d91436976d02a6c10003457 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 18:10:59 +0000 Subject: [PATCH 14/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e778595..684ed48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,7 +99,7 @@ build: # Only one project path can be passed as a parameter to 'dotnet build' command. script: - 'echo $RJW_DLL_URL' - - 'curl --create-dirs $RJW_DLL_URL -o ../../rjw/1.4/Assemblies/RJW.dll' + - 'curl --create-dirs "$RJW_DLL_URL" -o ../../rjw/1.4/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From 8bd4d5cd14a3636442408a3490f1ed826665580e Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 18:24:24 +0000 Subject: [PATCH 15/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 684ed48..c848e73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,8 +98,7 @@ build: # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). # Only one project path can be passed as a parameter to 'dotnet build' command. script: - - 'echo $RJW_DLL_URL' - - 'curl --create-dirs "$RJW_DLL_URL" -o ../../rjw/1.4/Assemblies/RJW.dll' + - 'curl --create-dirs "$RJW_DLL_URL" -o ../../rjw/$RIMWORLD_VERSION/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From 8315e2b8bebed56383ae5c458533bfebab939264 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 18:29:44 +0000 Subject: [PATCH 16/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c848e73..444063f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,7 +85,7 @@ cache: # Learn more about GitLab cache: https://docs.gitlab.com/ee/ci/caching/index.html before_script: - 'cd $SOURCE_CODE_PATH' - - 'dotnet restore --packages $NUGET_PACKAGES_DIRECTORY' + - 'dotnet restore --packages ../$NUGET_PACKAGES_DIRECTORY' build: stage: build @@ -98,7 +98,7 @@ build: # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). # Only one project path can be passed as a parameter to 'dotnet build' command. script: - - 'curl --create-dirs "$RJW_DLL_URL" -o ../../rjw/$RIMWORLD_VERSION/Assemblies/RJW.dll' + - 'curl -s --create-dirs "$RJW_DLL_URL" -o ../../rjw/$RIMWORLD_VERSION/Assemblies/RJW.dll' - 'dotnet build --no-restore' #tests: From c748aa266ac15dd6e32bcc6fc93238b30a56eec3 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 27 Apr 2024 18:34:50 +0000 Subject: [PATCH 17/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 444063f..37b5780 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,13 +90,6 @@ before_script: build: stage: build # ### Build all projects discovered from solution file. - # - # Note: this will fail if you have any projects in your solution that are not - # .NET Core-based projects (e.g. WCF service), which is based on .NET Framework, - # not .NET Core. In this scenario, you will need to build every .NET Core-based - # project by explicitly specifying a relative path to the directory - # where it is located (e.g. 'dotnet build ./src/ConsoleApp'). - # Only one project path can be passed as a parameter to 'dotnet build' command. script: - 'curl -s --create-dirs "$RJW_DLL_URL" -o ../../rjw/$RIMWORLD_VERSION/Assemblies/RJW.dll' - 'dotnet build --no-restore' From 2b86118ad6fa5a62b75e95a3510f077d2303718f Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 05:59:59 +0000 Subject: [PATCH 18/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37b5780..62ae2c7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,6 +93,10 @@ build: script: - 'curl -s --create-dirs "$RJW_DLL_URL" -o ../../rjw/$RIMWORLD_VERSION/Assemblies/RJW.dll' - 'dotnet build --no-restore' + artifacts: + untracked: false + when: on_success + expire_in: 3 days #tests: # stage: test From f48432d3ebb61dd7e75a08509c86ba18e1855cc1 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 06:02:09 +0000 Subject: [PATCH 19/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62ae2c7..1016ad0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -97,6 +97,8 @@ build: untracked: false when: on_success expire_in: 3 days + paths: + - / #tests: # stage: test From 479232e8b0ef9b767db3f9bc01cde76d3977d501 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 06:07:40 +0000 Subject: [PATCH 20/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1016ad0..1f4a827 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,7 +98,7 @@ build: when: on_success expire_in: 3 days paths: - - / + - "*" #tests: # stage: test From e41f0be25169562c7e1df9161071ae710c8a1b22 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 06:11:32 +0000 Subject: [PATCH 21/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1f4a827..fd328ef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,6 +99,8 @@ build: expire_in: 3 days paths: - "*" + exclude: + - ".*" #tests: # stage: test From 6f6291b8f88b47721d04298218d78096aa98501f Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 06:16:29 +0000 Subject: [PATCH 22/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd328ef..f8af6d1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,6 +101,7 @@ build: - "*" exclude: - ".*" + - ".*/" #tests: # stage: test From eef4121e1fe49be8918d8534557fde4caa98d94f Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 06:21:24 +0000 Subject: [PATCH 23/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8af6d1..cba51f6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,7 +101,7 @@ build: - "*" exclude: - ".*" - - ".*/" + - ".*/*" #tests: # stage: test From 6c7a9503f44bbd6d618d2add00b106d0e769c199 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 06:25:07 +0000 Subject: [PATCH 24/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cba51f6..eacfaad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,7 +101,7 @@ build: - "*" exclude: - ".*" - - ".*/*" + - ".*/**/*" #tests: # stage: test From 4136e131e799e71d51cc23933ee75cb66bfeffeb Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 06:31:20 +0000 Subject: [PATCH 25/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eacfaad..94a92bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,10 +98,11 @@ build: when: on_success expire_in: 3 days paths: - - "*" + - "*" # Incluse everything exclude: - - ".*" - - ".*/**/*" + - ".*" # Exclude dot files + - ".*/**/*" # Exclude everything in the dot folders + - "Source/**/*" # Exclude everything in the Source folder #tests: # stage: test From 80f0786960c6813a330c1bcc45acc959561104f4 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 13:51:52 +0000 Subject: [PATCH 26/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94a92bb..798f8d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ build: artifacts: untracked: false when: on_success - expire_in: 3 days + expire_in: 1 day paths: - "*" # Incluse everything exclude: @@ -117,7 +117,17 @@ build: # script: # - 'dotnet test --no-restore' -#deploy: -# stage: deploy -# script: echo "Define your deployment script!" -# environment: production +release_dev: + stage: deploy + image: registry.gitlab.com/gitlab-org/release-cli:latest + rules: + - if: $CI_COMMIT_TAG + when: never # Do not run this job when a tag is created manually + - if: $CI_COMMIT_BRANCH == "ci-test" # Run this job when commits are pushed or merged to the dev branch + script: + - echo "running release_job for $TAG" + release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties + tag_name: 'test-build-$CI_PIPELINE_IID' # The version is incremented per pipeline. + description: 'Automated release based on commit $CI_COMMIT_SHA' + ref: '$CI_COMMIT_SHA' # The tag is created from the pipeline SHA. + From bc6c37e0ccef1c0d299abb8001e2f27d24989465 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 14:00:17 +0000 Subject: [PATCH 27/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 798f8d4..30b57a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,14 +83,16 @@ cache: # in the root of project repository, so its content can be cached. # # Learn more about GitLab cache: https://docs.gitlab.com/ee/ci/caching/index.html -before_script: - - 'cd $SOURCE_CODE_PATH' - - 'dotnet restore --packages ../$NUGET_PACKAGES_DIRECTORY' +#before_script: +# - 'cd $SOURCE_CODE_PATH' +# - 'dotnet restore --packages ../$NUGET_PACKAGES_DIRECTORY' build: stage: build # ### Build all projects discovered from solution file. script: + - 'cd $SOURCE_CODE_PATH' + - 'dotnet restore --packages ../$NUGET_PACKAGES_DIRECTORY' - 'curl -s --create-dirs "$RJW_DLL_URL" -o ../../rjw/$RIMWORLD_VERSION/Assemblies/RJW.dll' - 'dotnet build --no-restore' artifacts: From 863dfc71dcfe7d7420c5fb62f3e78a848a064a60 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 14:03:28 +0000 Subject: [PATCH 28/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 30b57a9..56e5fa3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -127,7 +127,7 @@ release_dev: when: never # Do not run this job when a tag is created manually - if: $CI_COMMIT_BRANCH == "ci-test" # Run this job when commits are pushed or merged to the dev branch script: - - echo "running release_job for $TAG" + - echo "running release_job for TAG" release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties tag_name: 'test-build-$CI_PIPELINE_IID' # The version is incremented per pipeline. description: 'Automated release based on commit $CI_COMMIT_SHA' From 6aac2836bba93abb86e949af805622a6ffc4a148 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 14:11:08 +0000 Subject: [PATCH 29/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56e5fa3..5a72652 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -122,10 +122,10 @@ build: release_dev: stage: deploy image: registry.gitlab.com/gitlab-org/release-cli:latest - rules: - - if: $CI_COMMIT_TAG - when: never # Do not run this job when a tag is created manually - - if: $CI_COMMIT_BRANCH == "ci-test" # Run this job when commits are pushed or merged to the dev branch +# rules: +# - if: $CI_COMMIT_TAG +# when: never # Do not run this job when a tag is created manually +# - if: $CI_COMMIT_BRANCH == "ci-test" # Run this job when commits are pushed or merged to the dev branch script: - echo "running release_job for TAG" release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties From 12af69d11a50bd8b961bf1d4413d1e1a844f605e Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 14:42:48 +0000 Subject: [PATCH 30/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a72652..ae59f7f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -131,5 +131,5 @@ release_dev: release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties tag_name: 'test-build-$CI_PIPELINE_IID' # The version is incremented per pipeline. description: 'Automated release based on commit $CI_COMMIT_SHA' - ref: '$CI_COMMIT_SHA' # The tag is created from the pipeline SHA. +# ref: '$CI_COMMIT_SHA' # The tag is created from the pipeline SHA. From 61b209021a2889a88e278c1e7ad797bc3b8b37c4 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 14:56:50 +0000 Subject: [PATCH 31/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae59f7f..e0a6f26 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,6 +130,6 @@ release_dev: - echo "running release_job for TAG" release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties tag_name: 'test-build-$CI_PIPELINE_IID' # The version is incremented per pipeline. - description: 'Automated release based on commit $CI_COMMIT_SHA' -# ref: '$CI_COMMIT_SHA' # The tag is created from the pipeline SHA. + description: 'Automated release based on commit CI_COMMIT_SHA' + ref: '$CI_COMMIT_BRANCH' # The tag is created from the pipeline SHA. From 2399f2af6465e3e40bcbb693f62d69a3a7c6efcd Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 15:06:45 +0000 Subject: [PATCH 32/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0a6f26..7ccf58f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -127,9 +127,9 @@ release_dev: # when: never # Do not run this job when a tag is created manually # - if: $CI_COMMIT_BRANCH == "ci-test" # Run this job when commits are pushed or merged to the dev branch script: - - echo "running release_job for TAG" - release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties - tag_name: 'test-build-$CI_PIPELINE_IID' # The version is incremented per pipeline. - description: 'Automated release based on commit CI_COMMIT_SHA' - ref: '$CI_COMMIT_BRANCH' # The tag is created from the pipeline SHA. + - echo "running release_job for $CI_COMMIT_SHA" +# release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties +# tag_name: 'test-build-$CI_PIPELINE_IID' # The version is incremented per pipeline. +# description: 'Automated release based on commit CI_COMMIT_SHA' +# ref: '$CI_COMMIT_BRANCH' # The tag is created from the pipeline SHA. From e643833472267a8a12dd928e3f56603ef239f597 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 15:10:02 +0000 Subject: [PATCH 33/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ccf58f..d9afd90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -127,7 +127,7 @@ release_dev: # when: never # Do not run this job when a tag is created manually # - if: $CI_COMMIT_BRANCH == "ci-test" # Run this job when commits are pushed or merged to the dev branch script: - - echo "running release_job for $CI_COMMIT_SHA" + - 'echo "running release_job for $CI_COMMIT_SHA"' # release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties # tag_name: 'test-build-$CI_PIPELINE_IID' # The version is incremented per pipeline. # description: 'Automated release based on commit CI_COMMIT_SHA' From 818d288cc53d18c0759cfef028365c0950743fdd Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 17:19:35 +0000 Subject: [PATCH 34/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d9afd90..351a915 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -121,15 +121,16 @@ build: release_dev: stage: deploy - image: registry.gitlab.com/gitlab-org/release-cli:latest +# image: registry.gitlab.com/gitlab-org/release-cli:latest # this image currently is amd64 only + image: alpine:latest # rules: # - if: $CI_COMMIT_TAG # when: never # Do not run this job when a tag is created manually # - if: $CI_COMMIT_BRANCH == "ci-test" # Run this job when commits are pushed or merged to the dev branch script: - - 'echo "running release_job for $CI_COMMIT_SHA"' -# release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties -# tag_name: 'test-build-$CI_PIPELINE_IID' # The version is incremented per pipeline. -# description: 'Automated release based on commit CI_COMMIT_SHA' -# ref: '$CI_COMMIT_BRANCH' # The tag is created from the pipeline SHA. + - 'apk add gitlab-release-cli' + release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties + tag_name: 'test-build-$CI_PIPELINE_IID' # The version is incremented per pipeline. + description: 'Automated release based on commit CI_COMMIT_SHA' + ref: '$CI_COMMIT_SHA' # The tag is created from the pipeline SHA. From 00c4eac73a9e74f9fae11da691f59e0253146649 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sun, 28 Apr 2024 17:28:49 +0000 Subject: [PATCH 35/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 351a915..dfac7b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -123,10 +123,10 @@ release_dev: stage: deploy # image: registry.gitlab.com/gitlab-org/release-cli:latest # this image currently is amd64 only image: alpine:latest -# rules: -# - if: $CI_COMMIT_TAG -# when: never # Do not run this job when a tag is created manually -# - if: $CI_COMMIT_BRANCH == "ci-test" # Run this job when commits are pushed or merged to the dev branch + rules: + - if: $CI_COMMIT_TAG + when: never # Do not run this job when a tag is created manually + - if: $CI_COMMIT_BRANCH == "ci-test" # Run this job when commits are pushed or merged to the dev branch script: - 'apk add gitlab-release-cli' release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties From 41adf1086517ba62048059ce5f1089e5b57625be Mon Sep 17 00:00:00 2001 From: amevarashi Date: Mon, 29 Apr 2024 08:22:51 +0000 Subject: [PATCH 36/36] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dfac7b5..e473f22 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,20 +3,7 @@ # This specific template is located at: # https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/dotNET-Core.gitlab-ci.yml -# This is a simple example illustrating how to build and test .NET Core project -# with GitLab Continuous Integration / Continuous Delivery. -# # ### Specify the Docker image -# -# Instead of installing .NET Core SDK manually, a docker image is used -# with already pre-installed .NET Core SDK. -# -# The 'latest' tag targets the latest available version of .NET Core SDK image. -# If preferred, you can explicitly specify version of .NET Core (e.g. using '2.2-sdk' tag). -# -# See other available tags for .NET Core: https://hub.docker.com/_/microsoft-dotnet -# Learn more about Docker tags: https://docs.docker.com/glossary/?term=tag -# and the Docker itself: https://opensource.com/resources/what-docker image: mcr.microsoft.com/dotnet/sdk:latest # ### Define variables @@ -109,13 +96,6 @@ build: #tests: # stage: test # ### Run the tests - # - # You can either run tests for all test projects that are defined in your solution - # with 'dotnet test' or run tests only for specific project by specifying - # a relative path to the directory where it is located (e.g. 'dotnet test ./test/UnitTests'). - # - # You may want to define separate testing jobs for different types of testing - # (e.g. integration tests, unit tests etc). # script: # - 'dotnet test --no-restore' @@ -128,9 +108,10 @@ release_dev: when: never # Do not run this job when a tag is created manually - if: $CI_COMMIT_BRANCH == "ci-test" # Run this job when commits are pushed or merged to the dev branch script: + - 'ls -l' - 'apk add gitlab-release-cli' - release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties - tag_name: 'test-build-$CI_PIPELINE_IID' # The version is incremented per pipeline. - description: 'Automated release based on commit CI_COMMIT_SHA' + release: + tag_name: '$CI_COMMIT_BRANCH-$CI_PIPELINE_IID' # The version is incremented per pipeline. + description: 'Automated release based on commit $CI_COMMIT_SHORT_SHA $CI_COMMIT_TAG' ref: '$CI_COMMIT_SHA' # The tag is created from the pipeline SHA.