mirror of
https://github.com/elyby/chrly.git
synced 2025-01-05 11:41:49 +05:30
Обновлён .gitlab-ci: переименованы ENV перменные в соответствии с 9 версией GitLab
Исправлен вызов компилятора для "зашивания" версии при сборке
This commit is contained in:
parent
2e9520db89
commit
80fa307915
@ -26,7 +26,7 @@ variables:
|
|||||||
.docker_template: &setup_docker_environment
|
.docker_template: &setup_docker_environment
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u gitlab-ci -p $CI_BUILD_TOKEN registry.ely.by
|
- docker login -u gitlab-ci -p $CI_JOB_TOKEN registry.ely.by
|
||||||
- export TEMP_IMAGE_NAME="$CONTAINER_IMAGE:$CI_PIPELINE_ID"
|
- export TEMP_IMAGE_NAME="$CONTAINER_IMAGE:$CI_PIPELINE_ID"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@ -39,12 +39,12 @@ build executable:
|
|||||||
<<: *setup_go_environment
|
<<: *setup_go_environment
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- export VERSION="${CI_BUILD_TAG:-dev-$CI_BUILD_REF_NAME-${CI_BUILD_REF:0:8}+build-$CI_BUILD_ID}"
|
- export VERSION="${CI_COMMIT_TAG:-dev-$CI_COMMIT_REF_NAME-${CI_COMMIT_SHA:0:8}+build-$CI_JOB_ID}"
|
||||||
- >
|
- >
|
||||||
env GOOS=linux
|
env GOOS=linux
|
||||||
go build
|
go build
|
||||||
-o $CI_PROJECT_DIR/minecraft-skinsystem
|
-o $CI_PROJECT_DIR/minecraft-skinsystem
|
||||||
-ldflags "-X ${CI_PROJECT_NAMESPACE}/bootstrap.version=${VERSION}"
|
-ldflags "-X ${CI_PROJECT_PATH}/bootstrap.version=${VERSION}"
|
||||||
main.go
|
main.go
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "${CI_JOB_STAGE} executable"
|
name: "${CI_JOB_STAGE} executable"
|
||||||
@ -79,7 +79,7 @@ push tag:
|
|||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
script:
|
script:
|
||||||
- export IMAGE_NAME="$CONTAINER_IMAGE:$CI_BUILD_TAG"
|
- export IMAGE_NAME="$CONTAINER_IMAGE:$CI_COMMIT_TAG"
|
||||||
- export LATEST_IMAGE_NAME="$CONTAINER_IMAGE:latest"
|
- export LATEST_IMAGE_NAME="$CONTAINER_IMAGE:latest"
|
||||||
- docker tag $TEMP_IMAGE_NAME $IMAGE_NAME
|
- docker tag $TEMP_IMAGE_NAME $IMAGE_NAME
|
||||||
- docker tag $TEMP_IMAGE_NAME $LATEST_IMAGE_NAME
|
- docker tag $TEMP_IMAGE_NAME $LATEST_IMAGE_NAME
|
||||||
|
Loading…
Reference in New Issue
Block a user