From 41adf1086517ba62048059ce5f1089e5b57625be Mon Sep 17 00:00:00 2001 From: amevarashi Date: Mon, 29 Apr 2024 08:22:51 +0000 Subject: [PATCH 1/2] 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. From 3a4f4cc739b1a9f5146597d137700136b404e460 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Mon, 29 Apr 2024 08:35:39 +0000 Subject: [PATCH 2/2] 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 e473f22..8be4d8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -108,8 +108,8 @@ 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' + - 'ls -l' 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'