forked from Ultimaker/cura-build
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
127 lines (122 loc) · 4.29 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
stages:
- build
- deploy
#buildInDocker:
# stage: build
# image: stereotech/ste-slicer-build-environment:stable
# tags:
# - windows
# - powershell
# - docker
# before_script:
# - $Env:STESLICER_VERSION_MAJOR=(Get-Date).AddYears(-2019).Year
# - $Env:STESLICER_VERSION_MINOR=(Get-Date).AddYears(-2019).Month
# - $Env:STESLICER_VERSION_PATCH=(Get-Date).AddYears(-2019).Day
# - $Env:STESLICER_VERSION_EXTRA=nightly
# - $Env:STESLICER_BUILD_SRC_PATH=$env:CI_PROJECT_DIR
# - $Env:STESLICER_BUILD_OUTPUT_PATH=$env:CI_PROJECT_DIR\windows-installers
# - $Env:STESLICER_BRANCH_OR_TAG=develop
# - $Env:URANIUM_BRANCH_OR_TAG=steslicer
# - $Env:CURAENGINE_BRANCH_OR_TAG=master
# - $Env:LIBCHARON_BRANCH_OR_TAG=master
# - $Env:STESLICERBINARYDATA_BRANCH_OR_TAG=master
# - $Env:CLIPARSER_BRANCH_OR_TAG=master
# - $Env:CPACK_GENERATOR=NSIS
# - $Env:STESLICER_BUILD_NAME=win64
# - echo $Env:STESLICER_VERSION_MAJOR
# - echo $Env:STESLICER_VERSION_MINOR
# - echo $Env:STESLICER_VERSION_PATCH
# - echo $Env:STESLICER_VERSION_EXTRA
# - echo $Env:STESLICER_BUILD_SRC_PATH
# - echo $Env:STESLICER_BUILD_OUTPUT_PATH
# - echo $Env:STESLICER_BRANCH_OR_TAG
# - echo $Env:URANIUM_BRANCH_OR_TAG
# - echo $Env:CURAENGINE_BRANCH_OR_TAG
# - echo $Env:LIBCHARON_BRANCH_OR_TAG
# - echo $Env:STESLICERBINARYDATA_BRANCH_OR_TAG
# - echo $Env:CLIPARSER_BRANCH_OR_TAG
# - echo $Env:CPACK_GENERATOR
# - echo $Env:STESLICER_BUILD_NAME
# script:
# - powershell.exe -Command cmd /c "$env:CI_PROJECT_DIR\scripts\windows\build_in_docker_vs2015.cmd"
# only:
# - develop
# artifacts:
# name: "steslicer-$env:VERSION_MAJOR.$env:VERSION_MINOR.$env:VERSION_PATCH-nightly"
# paths:
# - windows-installers\build\package
buildNightlyRelease:
stage: build
image: stereotech/ste-slicer-build-environment:stable
tags:
- windows
- powershell
- docker
before_script:
- $Env:VERSION_MAJOR=(Get-Date).AddYears(-2019).Year
- $Env:VERSION_MINOR=(Get-Date).AddYears(-2019).Month
- $Env:VERSION_PATCH=(Get-Date).AddYears(-2019).Day
script:
- .\scripts\windows\build.ps1
-SteSlicerBranchOrTag "develop"
-CliParserDeployUsername $CLIPARSER_DEPLOY_USERNAME
-CliParserDeployToken $CLIPARSER_DEPLOY_TOKEN
-SteSlicerVersionMajor $env:VERSION_MAJOR
-SteSlicerVersionMinor $env:VERSION_MINOR
-SteSlicerVersionPatch $env:VERSION_PATCH
-SteSlicerVersionExtra "nightly"
only:
- develop
artifacts:
name: "steslicer-$env:VERSION_MAJOR.$env:VERSION_MINOR.$env:VERSION_PATCH-nightly"
paths:
- windows-installers\build\package
deployNightlyRelease:
stage: deploy
image: python:latest
needs: [buildNightlyRelease]
before_script:
- pip install awscli
- VERSION_MAJOR=$(date --date="-19 year" +%-g)
- VERSION_MINOR=$(date --date="-19 year" +%-m)
- VERSION_PATCH=$(date --date="-19 year" +%-d)
script:
- python -m zipfile -c steslicer-$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH-nightly.zip windows-installers/build/package
- aws s3 cp steslicer-$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH-nightly.zip s3://software.stereotech.org/steslicer/testing/ --acl public-read
only:
- develop
buildStableRelease:
stage: build
image: stereotech/ste-slicer-build-environment:stable
tags:
- windows
- powershell
- docker
script:
- .\scripts\windows\build.ps1
-SteSlicerBranchOrTag "master"
-CliParserDeployUsername $CLIPARSER_DEPLOY_USERNAME
-CliParserDeployToken $CLIPARSER_DEPLOY_TOKEN
-SteSlicerVersionMajor $VERSION_MAJOR
-SteSlicerVersionMinor $VERSION_MINOR
-SteSlicerVersionPatch $VERSION_PATCH
-SteSlicerVersionExtra ""
only:
- master
artifacts:
name: "steslicer-$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"
paths:
- "windows-installers/*.exe"
deployStableRelease:
stage: deploy
image: python:latest
needs: [buildStableRelease]
before_script:
- pip install awscli
script:
- aws s3 cp "windows-installers" s3://software.stereotech.org/steslicer/stable/ --recursive --include "*.exe" --acl public-read
- echo $VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH > latest.version
- aws s3 cp latest.version s3://software.stereotech.org/steslicer/stable/ --acl public-read
only:
- master
when: manual