Pipeline re-working v2
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# Deploy pipeline: lint, test, build, then Docker image → registry → Portainer webhook.
|
||||
# Runs on push to main, tag, or manual run.
|
||||
# See lint-and-build.yaml for PR-only (lint + test + build).
|
||||
# Deploy workflow: Docker image → push to registry → Portainer webhook.
|
||||
# Runs on push to main, tag, or manual (only when on main).
|
||||
# Waits for lint, build, and test workflows to succeed first.
|
||||
when:
|
||||
branch: main
|
||||
event: [push, tag, manual]
|
||||
|
||||
steps:
|
||||
- name: 'Docker image build'
|
||||
- name: docker-build
|
||||
image: docker:latest
|
||||
environment:
|
||||
REGISTRY_REPO: git.mifi.dev/mifi-ventures/landing
|
||||
@@ -30,7 +30,7 @@ steps:
|
||||
- build
|
||||
- test
|
||||
|
||||
- name: 'Push to registry'
|
||||
- name: push
|
||||
image: docker:latest
|
||||
environment:
|
||||
REGISTRY_URL: git.mifi.dev
|
||||
@@ -54,9 +54,9 @@ steps:
|
||||
- docker push $REGISTRY_REPO:latest
|
||||
- echo "✓ Images pushed successfully"
|
||||
depends_on:
|
||||
- 'Docker image build'
|
||||
- docker-build
|
||||
|
||||
- name: 'Trigger Portainer stack redeploy'
|
||||
- name: deploy
|
||||
image: curlimages/curl:latest
|
||||
environment:
|
||||
PORTAINER_WEBHOOK_URL:
|
||||
@@ -74,4 +74,4 @@ steps:
|
||||
fi
|
||||
echo "✓ Portainer redeploy triggered (HTTP $code)"
|
||||
depends_on:
|
||||
- 'Push to registry'
|
||||
- push
|
||||
|
||||
Reference in New Issue
Block a user