Rebuild gitlab CI file

This commit is contained in:
Manuel Cortez 2021-01-18 15:13:08 -06:00
parent 94960952b9
commit 035d1dabc6

View File

@ -4,6 +4,11 @@ variables:
PYTHON3_32: "C:\\python38\\python.exe" PYTHON3_32: "C:\\python38\\python.exe"
NSIS: "C:\\program files (x86)\\nsis\\makensis.exe" NSIS: "C:\\program files (x86)\\nsis\\makensis.exe"
stages:
- generate_docs
- build
- upload
# This configures the environment for both channels # This configures the environment for both channels
.configure_environment: &configure_environment .configure_environment: &configure_environment
tags: tags:
@ -25,7 +30,7 @@ variables:
# this job is triggered on every commit to master, so we always will display the latest available version of the documentation in the website. # this job is triggered on every commit to master, so we always will display the latest available version of the documentation in the website.
# We are not using the configure_environment job cause it adds all the dependencies, which are not needed for this to work. # We are not using the configure_environment job cause it adds all the dependencies, which are not needed for this to work.
documentation: documentation:
type: deploy stage: generate_docs
tags: tags:
- windows - windows
- shared-windows - shared-windows
@ -57,7 +62,7 @@ documentation:
# this is also executed on every commit to master. # this is also executed on every commit to master.
# commented out while we find a way to push to a git repository from a gitlab shared runner. # commented out while we find a way to push to a git repository from a gitlab shared runner.
.update_translation_templates: .update_translation_templates:
type: deploy stage: generate_docs
tags: tags:
- windows10 - windows10
script: script:
@ -84,7 +89,7 @@ documentation:
alpha32: alpha32:
<<: *configure_environment <<: *configure_environment
type: deploy stage: build
script: script:
# Create html documentation firstly. # Create html documentation firstly.
- copy changelog.md doc\changelog.md - copy changelog.md doc\changelog.md
@ -99,21 +104,27 @@ alpha32:
# Once built, makes the installer for for alpha. # Once built, makes the installer for for alpha.
- '&$env:NSIS installer_alpha.nsi' - '&$env:NSIS installer_alpha.nsi'
- cd .. - cd ..
- move src\socializer* . - mkdir artifacts
- move src\socializer* artifacts\
- cd scripts - cd scripts
# Zips the folder in order to create the portable socializer version. # Zips the folder in order to create the portable socializer version.
- '&$env:PYTHON3_32 prepare_zipversion.py' - '&$env:PYTHON3_32 prepare_zipversion.py'
- cd .. - cd ..
- move src\socializer.zip socializer_x86_alpha.zip - move src\socializer.zip artifacts\socializer_x86_alpha.zip
- '&$env:PYTHON3_32 scripts/generate_update_file.py' - '&$env:PYTHON3_32 scripts/generate_update_file.py'
- '&$env:PYTHON3_32 scripts/upload.py $FTP_SERVER $FTP_USERNAME $FTP_PASSWORD' - move *.json artifacts
only: only:
- master - master
artifacts:
paths:
- artifacts
expire_in: 1 day
# Generates a new stable version of the application every tag. # Generates a new stable version of the application every tag.
stable: stable:
<<: *configure_environment <<: *configure_environment
type: deploy stage: build
script: script:
- copy changelog.md doc\changelog.md - copy changelog.md doc\changelog.md
- cd doc - cd doc
@ -132,3 +143,16 @@ stable:
- '&$env:PYTHON3_32 scripts/upload.py' - '&$env:PYTHON3_32 scripts/upload.py'
only: only:
- tags - tags
upload:
stage: upload
tags:
- linux
image: python
script:
- cd artifacts
- python ../scripts/upload.py
only:
- master
- tags
- schedules