diff --git a/.drone.yml b/.drone.yml index 3eae804..1697054 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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: