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 kind: pipeline
type: docker type: docker
name: build-and-push-pwa name: build-and-push-landing
steps: steps:
- name: build flutter - name: tag
image: ghcr.io/cirruslabs/flutter:3.38.10 image: alpine/git:2.40.1
commands: commands:
- flutter --version
- | - |
set -e set -e
SHORT_SHA=$(echo "$DRONE_COMMIT_SHA" | cut -c1-8) SHORT_SHA=$(echo "$DRONE_COMMIT_SHA" | cut -c1-8)
IMG_TAG="${DRONE_BUILD_NUMBER}-${DRONE_BRANCH}" IMG_TAG="${DRONE_BUILD_NUMBER}-${DRONE_BRANCH}"
echo -n "$IMG_TAG,$SHORT_SHA" > .tags echo -n "$IMG_TAG,$SHORT_SHA" > .tags
echo "Image tags -> $IMG_TAG , $SHORT_SHA" 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 image: plugins/docker
settings: settings:
registry: git.opplens.se registry: git.opplens.se
repo: git.opplens.se/mazyar/pwa repo: git.opplens.se/mazyar/landing
username: username:
from_secret: registry_username from_secret: registry_username
password: password:
@@ -43,10 +38,10 @@ steps:
- set -e - set -e
- cd /data/tm-uat - cd /data/tm-uat
- NEW_TAG="${DRONE_BUILD_NUMBER}-${DRONE_BRANCH}" - NEW_TAG="${DRONE_BUILD_NUMBER}-${DRONE_BRANCH}"
- echo "Deploying pwa tag $NEW_TAG" - echo "Deploying landing tag $NEW_TAG"
- sed -i "s/^PWA_IMG_TAG=.*/PWA_IMG_TAG=$NEW_TAG/" .env - sed -i "s/^LANDING_IMG_TAG=.*/LANDING_IMG_TAG=$NEW_TAG/" .env
- docker compose pull pwa - docker compose pull landing
- docker compose up -d pwa - docker compose up -d landing
- docker image prune -f - docker image prune -f
when: when:
branch: branch:
@@ -54,7 +49,7 @@ steps:
trigger: trigger:
branch: branch:
- master - main
- uat - uat
- dev - dev
event: event: