mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2026-03-14 23:00:01 +01:00
Merge branch 'main' of gitlab.sectorq.eu:jaydee/portainer
This commit is contained in:
@@ -14,10 +14,12 @@ notify1:
|
||||
- column=':'
|
||||
- echo "${flow_id}"
|
||||
- curl -XPOST http://192.168.77.101:8123/api/webhook/voice-notifications-tC_8YKxMJIAaQRV5riKuC7Zl --data-raw 'message=portainer build job started'
|
||||
- rm -rf /home/gitlab-runner/builds/1fLwHSKm2/0/jaydee/portainer.tmp
|
||||
- rm -rf /home/gitlab-runner/builds/1fLwHSKm2/0/jaydee/portainer.tmp
|
||||
rules:
|
||||
- if: '$CI_COMMIT_MESSAGE =~ /build/'
|
||||
lint:
|
||||
stage: lint
|
||||
image: r.sectorq.eu/jaydee/builder-portainer:latest
|
||||
image: r.sectorq.eu/jaydee/builder:latest
|
||||
before_script:
|
||||
- python3 -m pip install --break-system-packages flake8 black pylint tabulate prompt_toolkit hvac
|
||||
- export PATH="$PATH:/home/gitlab-runner/.local/bin"
|
||||
@@ -31,7 +33,7 @@ lint:
|
||||
- if: '$CI_COMMIT_MESSAGE =~ /lint/'
|
||||
build-job: # This job runs in the build stage, which runs first.
|
||||
stage: build
|
||||
image: r.sectorq.eu/jaydee/builder-portainer:latest
|
||||
image: r.sectorq.eu/jaydee/builder:latest
|
||||
script:
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
|
||||
@@ -43,7 +45,7 @@ build-job: # This job runs in the build stage, which runs first.
|
||||
- pyinstaller --onefile --clean -n portainer main.py
|
||||
#- scp -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer jd@192.168.80.222:/myapps/bin/ || true
|
||||
- scp -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer jd@192.168.77.12:/myapps/bin/ || true
|
||||
- scp -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer jd@192.168.77.101:/myapps/bin/ || true
|
||||
- curl -F "file=@dist/portainer" https://myapps.sectorq.eu/
|
||||
- rm -rf /home/gitlab-runner/builds/1fLwHSKm2/0/jaydee/portainer.tmp
|
||||
artifacts:
|
||||
paths:
|
||||
@@ -65,10 +67,10 @@ build-job-arm: # This job runs in the build stage, which runs first.
|
||||
#- pyinstaller --onefile --add-data "port.py:." portainer.py
|
||||
- rm -rf build dist *.spec
|
||||
- python3 main.py -h
|
||||
- pyinstaller --onefile --clean -n portainer-arm main.py
|
||||
- pyinstaller --onefile --clean -n portainer_arm main.py
|
||||
#- scp -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer jd@192.168.80.222:/myapps/bin/ || true
|
||||
- scp -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer-arm jd@192.168.77.238:/myapps/bin/ || true
|
||||
- scp -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer-arm jd@192.168.77.101:/myapps/bin/ || true
|
||||
- scp -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer_arm jd@192.168.77.12:/myapps/bin/ || true
|
||||
- curl -F "file=@dist/portainer_arm" https://myapps.sectorq.eu/
|
||||
- rm -rf /home/gitlab-runner/builds/1fLwHSKm2/0/jaydee/portainer.tmp
|
||||
artifacts:
|
||||
paths:
|
||||
@@ -78,7 +80,9 @@ build-job-arm: # This job runs in the build stage, which runs first.
|
||||
# - echo "${flow_id}"
|
||||
# - curl -X POST https://kestra.sectorq.eu/api/v1/executions/webhook/jaydee/ansible-all/${flow_id} -d '{"tag":["proxmox"],"target":["servers"]}' -H "Content-Type${column} application/json"
|
||||
rules:
|
||||
- if: '$CI_COMMIT_MESSAGE =~ /build/'
|
||||
- if: '$CI_COMMIT_MESSAGE =~ /build-all/'
|
||||
|
||||
|
||||
clean-job: # This job runs in the build stage, which runs first.
|
||||
stage: clean
|
||||
script:
|
||||
@@ -98,6 +102,8 @@ notify:
|
||||
- echo "${flow_id}"
|
||||
- curl -XPOST http://192.168.77.101:8123/api/webhook/voice-notifications-tC_8YKxMJIAaQRV5riKuC7Zl --data-raw 'message=portainer build job completed'
|
||||
- rm -rf /home/gitlab-runner/builds/1fLwHSKm2/0/jaydee/portainer.tmp
|
||||
rules:
|
||||
- if: '$CI_COMMIT_MESSAGE =~ /build/'
|
||||
notify2:
|
||||
stage: notify # Should be in a later stage than the job that might fail
|
||||
when: on_failure # <-- This is the key keyword
|
||||
|
||||
Reference in New Issue
Block a user