Update .drone.yml
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-06-20 09:14:55 +00:00
parent ca85d3142d
commit bc21c711ee
+10 -15
View File
@@ -1,28 +1,23 @@
kind: pipeline
type: docker
name: build-and-push-pwa
name: build-and-push-landing
steps:
- name: build flutter
image: ghcr.io/cirruslabs/flutter:3.38.10
- name: tag
image: alpine/git:2.40.1
commands:
- flutter --version
- |
set -e
SHORT_SHA=$(echo "$DRONE_COMMIT_SHA" | cut -c1-8)
IMG_TAG="${DRONE_BUILD_NUMBER}-${DRONE_BRANCH}"
echo -n "$IMG_TAG,$SHORT_SHA" > .tags
echo "Image tags -> $IMG_TAG , $SHORT_SHA"
- rm -rf pwa_dist
- flutter pub get
- flutter build web --release --output=pwa_dist
- ls -ltrh pwa_dist
- name: push pwa
- name: build landing
image: plugins/docker
settings:
registry: git.opplens.se
repo: git.opplens.se/mazyar/pwa
repo: git.opplens.se/mazyar/landing
username:
from_secret: registry_username
password:
@@ -43,10 +38,10 @@ steps:
- set -e
- cd /data/tm-uat
- NEW_TAG="${DRONE_BUILD_NUMBER}-${DRONE_BRANCH}"
- echo "Deploying pwa tag $NEW_TAG"
- sed -i "s/^PWA_IMG_TAG=.*/PWA_IMG_TAG=$NEW_TAG/" .env
- docker compose pull pwa
- docker compose up -d pwa
- echo "Deploying landing tag $NEW_TAG"
- sed -i "s/^LANDING_IMG_TAG=.*/LANDING_IMG_TAG=$NEW_TAG/" .env
- docker compose pull landing
- docker compose up -d landing
- docker image prune -f
when:
branch:
@@ -54,7 +49,7 @@ steps:
trigger:
branch:
- master
- main
- uat
- dev
event: