Attempted to push a drone test file
This commit is contained in:
parent
a1d9b27d67
commit
b8066adbca
21
.drone.yml
Normal file
21
.drone.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: aws
|
||||||
|
name: default
|
||||||
|
|
||||||
|
pool:
|
||||||
|
use: windows
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: check install
|
||||||
|
commands:
|
||||||
|
- type C:\ProgramData\Amazon\EC2-Windows\Launch\Log\UserdataExecution.log
|
||||||
|
|
||||||
|
- name: install choco
|
||||||
|
commands:
|
||||||
|
- @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
|
||||||
|
|
||||||
|
- name: install dependencies
|
||||||
|
commands:
|
||||||
|
- choco install python --version 3.7.9 -y -ForceX86
|
||||||
|
- python -v
|
168
.gitlab-ci.yml
168
.gitlab-ci.yml
@ -1,168 +0,0 @@
|
|||||||
# This CI configuration file assumes we are going to use gitlab Shared runners at gitlab.com
|
|
||||||
# due to gitlab possibilities, we use a mix of Windows and docker containers (the python image) to build the project.
|
|
||||||
# the next variables are customized to the filepaths used when installing python and nsis with chocolatey on the windows runners.
|
|
||||||
variables:
|
|
||||||
PYTHON3_32: "C:\\python37\\python.exe"
|
|
||||||
NSIS: "C:\\program files (x86)\\nsis\\makensis.exe"
|
|
||||||
PIP_CACHE_DIR: "$CI_PROJECT_DIR\\.cache\\pip"
|
|
||||||
|
|
||||||
# The project defines 3 stages:
|
|
||||||
# 1. Generate_docs: generates the documentation and update translation files. This uses the python docker image.
|
|
||||||
# 2. Build: Creates the executable file by using a windows runner.
|
|
||||||
# 3. Upload: Puts everything in an ftp directory. I had to use a docker container here because the Windows runner has all ports blocked.
|
|
||||||
stages:
|
|
||||||
- generate_docs
|
|
||||||
- build
|
|
||||||
- make_installer
|
|
||||||
- upload
|
|
||||||
|
|
||||||
# This configures the environment for both channels
|
|
||||||
.configure_environment: &configure_environment
|
|
||||||
tags:
|
|
||||||
- shared-windows
|
|
||||||
- windows
|
|
||||||
- windows-1809
|
|
||||||
before_script:
|
|
||||||
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
|
|
||||||
- echo ${time}
|
|
||||||
- echo "started by ${GITLAB_USER_NAME}"
|
|
||||||
- choco install python --version 3.7.9 -y -ForceX86
|
|
||||||
- '&$env:PYTHON3_32 -V'
|
|
||||||
- '&$env:PYTHON3_32 -m pip install --upgrade pip'
|
|
||||||
- '&$env:PYTHON3_32 -m pip install --upgrade -r requirements.txt'
|
|
||||||
- '&$env:PYTHON3_32 -m pip uninstall enum34 -y'
|
|
||||||
|
|
||||||
# Create documentation in all available languages so we'll have it at http://socializer.su/documentation
|
|
||||||
# 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.
|
|
||||||
pages:
|
|
||||||
stage: generate_docs
|
|
||||||
image: python
|
|
||||||
interruptible: true
|
|
||||||
cache:
|
|
||||||
key: 32bits
|
|
||||||
paths:
|
|
||||||
- "C:\\Users\\gitlab_runner\\AppData\\Local\\Nuitka\\Nuitka\\Cache"
|
|
||||||
- ".cache"
|
|
||||||
- "C:\\python37-32\\lib\\site-packages"
|
|
||||||
script:
|
|
||||||
- echo "started by ${GITLAB_USER_NAME}"
|
|
||||||
- python -V
|
|
||||||
### Dependencies.
|
|
||||||
- python -m pip install --upgrade markdown
|
|
||||||
# generate all html documents.
|
|
||||||
- cp changelog.md doc/changelog.md
|
|
||||||
- mkdir public
|
|
||||||
- cd doc
|
|
||||||
- python documentation_importer.py
|
|
||||||
- cd ../src
|
|
||||||
- python ../doc/generator.py
|
|
||||||
- mv -f documentation ../public
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- public
|
|
||||||
name: socializer_documentation
|
|
||||||
expire_in: 1 day
|
|
||||||
|
|
||||||
### Updates all translation templates for weblate
|
|
||||||
# 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.
|
|
||||||
.update_translation_templates:
|
|
||||||
stage: generate_docs
|
|
||||||
tags:
|
|
||||||
- windows10
|
|
||||||
interruptible: true
|
|
||||||
script:
|
|
||||||
- '&$env:PYTHON3_32 -m pip install --upgrade babel'
|
|
||||||
- copy changelog.md doc\changelog.md
|
|
||||||
- cd doc
|
|
||||||
- '&$env:PYTHON3_32 documentation_importer.py'
|
|
||||||
- cd ..\src
|
|
||||||
- '&$env:PYTHON3_32 setup.py extract_messages -F babel.cfg --input-dirs . --output-file ..\scripts\socializer.pot'
|
|
||||||
- '&$env:PYTHON3_32 setup.py update_catalog --no-fuzzy-matching --domain socializer --output-dir locales --input-file ..\scripts\socializer.pot'
|
|
||||||
- cd ..\doc
|
|
||||||
- '&$env:PYTHON3_32 translate.py'
|
|
||||||
- cd ..
|
|
||||||
# After generation, it's time to push all translation updates.
|
|
||||||
- 'git config user.name "Windows runner"'
|
|
||||||
- 'git config user.email "manuel@manuelcortez.net"'
|
|
||||||
- 'git add scripts'
|
|
||||||
- 'git add src\locales'
|
|
||||||
- 'git remote set-url --push origin git@code.manuelcortez.net:$env:CI_PROJECT_PATH'
|
|
||||||
- 'git commit -m "Updated locales [skip ci]"'
|
|
||||||
- 'git push origin HEAD:$env:CI_COMMIT_REF_NAME'
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
32bits:
|
|
||||||
<<: *configure_environment
|
|
||||||
stage: build
|
|
||||||
interruptible: true
|
|
||||||
script:
|
|
||||||
# Create html documentation firstly.
|
|
||||||
- copy changelog.md doc\changelog.md
|
|
||||||
- cd doc
|
|
||||||
- '&$env:PYTHON3_32 documentation_importer.py'
|
|
||||||
- cd ..\src
|
|
||||||
- '&$env:PYTHON3_32 ..\doc\generator.py'
|
|
||||||
# Write version info useful for updates.
|
|
||||||
- '&$env:PYTHON3_32 write_version_data.py'
|
|
||||||
# build it all.
|
|
||||||
- '&$env:PYTHON3_32 -m nuitka --mingw64 --standalone --enable-plugin=anti-bloat --noinclude-pytest-mode=nofollow --noinclude-setuptools-mode=nofollow --nofollow-import-to=numpy --nofollow-import-to=babel --nofollow-import-to=cx_freeze --nofollow-import-to=pil --include-data-file=../windows-dependencies/x86/oggenc2.exe=oggenc2.exe --include-data-file=../windows-dependencies/x86/bootstrap.exe=bootstrap.exe --include-data-file=app-configuration.defaults=app-configuration.defaults --include-data-dir=locales=locales --include-data-dir=documentation=documentation --include-data-dir=sounds=sounds --include-data-file=session.defaults=session.defaults --windows-disable-console --windows-file-description="Accessible VK Client for Windows" --windows-product-version=2021.12.14.0 --windows-file-version=2021.12.14.0 --windows-product-name="Socializer" --windows-company-name="MCV Software" --python-flag=no_site --assume-yes-for-downloads --remove-output "socializer.py"'
|
|
||||||
- '&$env:PYTHON3_32 ..\scripts\copy_missing_files.py'
|
|
||||||
- cd ..
|
|
||||||
- mkdir artifacts
|
|
||||||
# Zips the folder in order to create the portable socializer version.
|
|
||||||
- cd scripts
|
|
||||||
- '&$env:PYTHON3_32 prepare_zipversion.py'
|
|
||||||
- cd ..
|
|
||||||
- move src\socializer.zip artifacts\socializer_x86.zip
|
|
||||||
- mv src/socializer.dist artifacts/socializer
|
|
||||||
- move src/installer.nsi artifacts
|
|
||||||
- '&$env:PYTHON3_32 scripts/generate_update_file.py'
|
|
||||||
- move *.json artifacts
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- artifacts
|
|
||||||
expire_in: 1 day
|
|
||||||
|
|
||||||
generate_versions:
|
|
||||||
stage: make_installer
|
|
||||||
tags:
|
|
||||||
- shared-windows
|
|
||||||
- windows
|
|
||||||
- windows-1809
|
|
||||||
before_script:
|
|
||||||
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
|
|
||||||
- echo ${time}
|
|
||||||
- echo "started by ${GITLAB_USER_NAME}"
|
|
||||||
- choco install nsis -y -ForceX86
|
|
||||||
script:
|
|
||||||
- cd artifacts
|
|
||||||
- '&$env:NSIS installer.nsi'
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
- master
|
|
||||||
- schedules
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- artifacts
|
|
||||||
expire_in: 1 day
|
|
||||||
|
|
||||||
upload:
|
|
||||||
stage: upload
|
|
||||||
tags:
|
|
||||||
- linux
|
|
||||||
image: python
|
|
||||||
interruptible: true
|
|
||||||
script:
|
|
||||||
- cd artifacts
|
|
||||||
- python ../scripts/upload.py
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
- tags
|
|
||||||
- schedules
|
|
Loading…
Reference in New Issue
Block a user