mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2024-08-15 00:43:19 +00:00
Compare commits
36 commits
master
...
ci-test-40
Author | SHA1 | Date | |
---|---|---|---|
|
41adf10865 | ||
|
00c4eac73a | ||
|
818d288cc5 | ||
|
e643833472 | ||
|
2399f2af64 | ||
|
61b209021a | ||
|
12af69d11a | ||
|
6aac2836bb | ||
|
863dfc71dc | ||
|
bc6c37e0cc | ||
|
80f0786960 | ||
|
4136e131e7 | ||
|
6c7a9503f4 | ||
|
eef4121e1f | ||
|
6f6291b8f8 | ||
|
e41f0be251 | ||
|
479232e8b0 | ||
|
f48432d3eb | ||
|
2b86118ad6 | ||
|
c748aa266a | ||
|
8315e2b8be | ||
|
8bd4d5cd14 | ||
|
d39a01a962 | ||
|
332a65eb7d | ||
|
b2fae1c39c | ||
|
79a3dc684b | ||
|
45e84a83fc | ||
|
d598f33e74 | ||
|
57f3feae8b | ||
|
6bc7a58be1 | ||
|
b83b0c0ecd | ||
|
76bd1bdabf | ||
|
97cd357cf7 | ||
|
f718e863e3 | ||
|
3bcc4f334e | ||
|
89aefe03fe |
1 changed files with 117 additions and 0 deletions
117
.gitlab-ci.yml
Normal file
117
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,117 @@
|
|||
# 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/dotNET-Core.gitlab-ci.yml
|
||||
|
||||
# ### Specify the Docker image
|
||||
image: mcr.microsoft.com/dotnet/sdk:latest
|
||||
|
||||
# ### Define variables
|
||||
#
|
||||
variables:
|
||||
# 1) Name of directory where restore and build objects are stored.
|
||||
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.
|
||||
# NOTE: Please edit this path so it matches the structure of your project!
|
||||
SOURCE_CODE_PATH: 'Source/'
|
||||
|
||||
# ### 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 <PATH>' 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:
|
||||
# - '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:
|
||||
untracked: false
|
||||
when: on_success
|
||||
expire_in: 1 day
|
||||
paths:
|
||||
- "*" # Incluse everything
|
||||
exclude:
|
||||
- ".*" # Exclude dot files
|
||||
- ".*/**/*" # Exclude everything in the dot folders
|
||||
- "Source/**/*" # Exclude everything in the Source folder
|
||||
|
||||
#tests:
|
||||
# stage: test
|
||||
# ### Run the tests
|
||||
# script:
|
||||
# - 'dotnet test --no-restore'
|
||||
|
||||
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
|
||||
script:
|
||||
- 'ls -l'
|
||||
- 'apk add gitlab-release-cli'
|
||||
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.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue