Move from file JOB_ID to env

Resolves BOM issue hopefully
This commit is contained in:
Zedifus 2022-06-16 20:37:50 +01:00
parent 021a4ad002
commit cae8f2697f
2 changed files with 11 additions and 5 deletions

View File

@ -5,14 +5,19 @@ release:
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
needs:
- job: win-prod-build
artifacts: true
script:
- echo "Build Job $JOB_ID"
- echo "Running release job for tag $CI_COMMIT_TAG"
release:
tag_name: $CI_COMMIT_TAG
name: Crafty $CI_COMMIT_TAG
tag_name: $CI_COMMIT_TAG
description: ./CHANGELOG.md
ref: $CI_COMMIT_TAG
assets:
links:
- name: Windows Package
url: "${CI_PROJECT_URL}/-/jobs/`cat CI_JOB_ID.txt`/artifacts/download"
url: "$CI_PROJECT_URL/-/jobs/$JOB_ID/artifacts/download"
link_type: package

View File

@ -49,12 +49,10 @@ win-prod-build:
paths:
- .venv/
rules:
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
- if: $CI_COMMIT_TAG
environment:
name: production
script:
- echo "${CI_JOB_ID}" > CI_JOB_ID.txt
- |
$ErrorActionPreference = "Stop"
py -m venv .venv
@ -73,6 +71,8 @@ win-prod-build:
--collect-all tzdata
--collect-all pytz
--collect-all six
after_script:
- echo "JOB_ID=$CI_JOB_ID" >> job.env
# Download latest:
# | https://gitlab.com/crafty-controller/crafty-4/-/jobs/artifacts/master/download?job=win-prod-build
@ -81,7 +81,8 @@ win-prod-build:
paths:
- app\
- .\crafty_commander.exe
- CI_JOB_ID.txt
expire_in: never
exclude:
- app\classes\**\*
reports:
dotenv: job.env