Update .gitlab-ci.yml file #5
This commit is contained in:
@@ -4,32 +4,32 @@ stages: # Define the stages of the pipeline.
|
|||||||
#- test
|
#- test
|
||||||
- release
|
- release
|
||||||
|
|
||||||
web-build: # This job runs in the build stage, which runs first.
|
# web-build: # This job runs in the build stage, which runs first.
|
||||||
stage: build
|
# stage: build
|
||||||
image: node:24
|
# image: node:24
|
||||||
script:
|
# script:
|
||||||
- cd Web
|
# - cd Web
|
||||||
- npm install
|
# - npm install
|
||||||
- npm run build
|
# - npm run build
|
||||||
artifacts: # Artifacts are files that are passed between stages.
|
# artifacts: # Artifacts are files that are passed between stages.
|
||||||
paths:
|
# paths:
|
||||||
- Web/dist/Web/browser # The 'dist' directory will be available in the next stage.
|
# - Web/dist/Web/browser # The 'dist' directory will be available in the next stage.
|
||||||
when: on_success
|
# when: on_success
|
||||||
access: all
|
# access: all
|
||||||
expire_in: 30 days
|
# expire_in: 30 days
|
||||||
|
|
||||||
api-build:
|
# api-build:
|
||||||
stage: build
|
# stage: build
|
||||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
# image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||||
script:
|
# script:
|
||||||
- cd Api
|
# - cd Api
|
||||||
- dotnet publish Api.csproj --output ./build --runtime linux-x64 --configuration Release --self-contained true
|
# - dotnet publish Api.csproj --output ./build --runtime linux-x64 --configuration Release --self-contained true
|
||||||
artifacts:
|
# artifacts:
|
||||||
paths:
|
# paths:
|
||||||
- Api/build
|
# - Api/build
|
||||||
when: on_success
|
# when: on_success
|
||||||
access: all
|
# access: all
|
||||||
expire_in: 30 days
|
# expire_in: 30 days
|
||||||
|
|
||||||
semantic-release:
|
semantic-release:
|
||||||
image: node:24
|
image: node:24
|
||||||
@@ -66,10 +66,12 @@ docker-build:
|
|||||||
DOCKER_HOST: tcp://docker:2375
|
DOCKER_HOST: tcp://docker:2375
|
||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ""
|
||||||
before_script:
|
before_script:
|
||||||
- ip a
|
|
||||||
- docker info
|
- docker info
|
||||||
script:
|
script:
|
||||||
- docker build -t centrum-api:latest -f Dockerfile .
|
- docker build -t centrum-api:latest -f Dockerfile .
|
||||||
|
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
|
||||||
|
- docker tag centrum-api:latest $CI_REGISTRY_IMAGE:latest
|
||||||
|
- docker push $CI_REGISTRY_IMAGE:latest
|
||||||
|
|
||||||
docker-deploy:
|
docker-deploy:
|
||||||
stage: release
|
stage: release
|
||||||
@@ -80,6 +82,4 @@ docker-deploy:
|
|||||||
tags:
|
tags:
|
||||||
- production
|
- production
|
||||||
script:
|
script:
|
||||||
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
|
- docker pull $CI_REGISTRY_IMAGE:latest
|
||||||
- docker tag centrum-api:latest $CI_REGISTRY_IMAGE:latest
|
|
||||||
- docker push $CI_REGISTRY_IMAGE:latest
|
|
||||||
|
|||||||
Reference in New Issue
Block a user