Skip to content

Commit

Permalink
Added GitLab CI example (#71)
Browse files Browse the repository at this point in the history
* 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: Fedor Batonogov <[email protected]>
  • Loading branch information
github-actions[bot] and batonogov authored Mar 24, 2024
1 parent ac98dce commit a9d4b5d
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/docker-image-linux-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docker-image-osx-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docker-image-windows-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
51 changes: 51 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a9d4b5d

Please sign in to comment.