Unverified Commit a9d4b5d4 authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Added GitLab CI example (#71)



* Test gitlab ci

* Added gitlab pipeline

* Update gitlab ci

* Added artifacts

* Update artifacts paths

* Update artifacts paths

* Update artifacts paths

* Update artifacts paths

* Update artifacts paths

* Added exampmple for all images

* Update artifacts paths

* Update artifacts paths

* Added install requirements

* Remove osx job

* Added example for GitLab CI

* Added example for GitLab CI

* Update build jobs

* Update artifacts paths

---------

Co-authored-by: default avatarFedor Batonogov <f.batonogov@yandex.ru>
parent ac98dce6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ env:

jobs:
  build:

    runs-on: ubuntu-latest
    permissions:
      contents: read
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ env:

jobs:
  build:

    runs-on: ubuntu-latest
    permissions:
      contents: read
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ env:

jobs:
  build:

    runs-on: ubuntu-latest
    permissions:
      contents: read

.gitlab-ci.yml

0 → 100644
+51 −0
Original line number Diff line number Diff line
windows_bin:
  stage: deploy
  image:
    name: batonogov/pyinstaller-windows:latest
    entrypoint: ['']
  script:
    - echo "Creating Windows artifact"
    - pip install -r ./test/requirements.txt
    - cd ./test && pyinstaller --onefile main.py
    - cp ./dist/*.exe ../
  rules:
    - when: always
  artifacts:
    paths:
      - '*.exe'
    when: always
    expire_in: 2 week

linux_bin:
  stage: deploy
  image:
    name: batonogov/pyinstaller-linux:latest
    entrypoint: ['']
  script:
    - echo "Creating Linux artifact"
    - pip install -r ./test/requirements.txt
    - cd ./test && pyinstaller --onefile main.py
  rules:
    - when: always
  artifacts:
    paths:
      - ./test/dist/*
    when: always
    expire_in: 2 week

linux_slim_bin:
  stage: deploy
  image:
    name: batonogov/pyinstaller-linux:latest-slim
    entrypoint: ['']
  script:
    - echo "Creating Linux artifact"
    - pip install -r ./test/requirements.txt
    - cd ./test && pyinstaller --onefile main.py
  rules:
    - when: always
  artifacts:
    paths:
      - ./test/dist/*
    when: always
    expire_in: 2 week
+26 −1
Original line number Diff line number Diff line
@@ -90,15 +90,40 @@ will generate a `spec` file for `your-script.py` in your current working directo

### How do I change the PyInstaller version used?

Add `pyinstaller==6.3.0` to your `requirements.txt`.
Add `pyinstaller==6.4.0` to your `requirements.txt`.

### Is it possible to use a package mirror?

Yes, by supplying the `PYPI_URL` and `PYPI_INDEX_URL` environment variables that point to your PyPi mirror.

### How do I use image in GitLab CI?

See [example](.gitlab-ci.yml) for GitLab CI.

```gitlab_ci
windows_bin:
  stage: deploy
  image:
    name: batonogov/pyinstaller-windows:latest
    entrypoint: ['']
  script:
    - echo "Creating Windows artifact"
    - pip install -r ./test/requirements.txt
    - cd ./test && pyinstaller --onefile main.py
    - cp ./build/*.exe ../
  rules:
    - when: always
  artifacts:
    paths:
      - '*.exe'
    when: always
    expire_in: 2 week
```

## Known Issues

[ntdll.so Path Missing](https://github.com/batonogov/docker-pyinstaller/issues/23)

[Outdated Microsoft C++ Build Tools](https://github.com/batonogov/docker-pyinstaller/issues/11)

## History