update build
This commit is contained in:
+32
-22
@@ -1,38 +1,48 @@
|
||||
################################################################################
|
||||
# development
|
||||
################################################################################
|
||||
########### MOODIO TEST ###########
|
||||
###################################
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: (main) build flutter web and push to artifactory
|
||||
|
||||
name: (pwa-test) build pwa and scp to test server
|
||||
steps:
|
||||
- name: pwa tag
|
||||
image: alpine/git:2.40.1
|
||||
- name: build flutter
|
||||
image: docker-mirror.ravanertebat.ir/ghcr/cirruslabs/flutter:3.38.10
|
||||
commands:
|
||||
- APP_VERSION=$(git rev-list HEAD --count --no-merges)-$DRONE_BRANCH
|
||||
- flutter --version
|
||||
- |
|
||||
set -e
|
||||
case "$DRONE_BRANCH" in
|
||||
master) echo prod;;
|
||||
uat) echo uat;;
|
||||
dev) echo test;;
|
||||
*) echo dev;;
|
||||
esac > .environment
|
||||
- echo "Branch ${DRONE_BRANCH}, Environment $(cat .environment)"
|
||||
- APP_VERSION=$(cat .environment)-${DRONE_BUILD_NUMBER}
|
||||
- echo "APP Version tags $APP_VERSION"
|
||||
- echo -n "$APP_VERSION" >> .tags
|
||||
- echo -n "$APP_VERSION,latest" >> .tags
|
||||
- mkdir -p ./artifacts/flutter
|
||||
- rm -rf build
|
||||
- flutter pub get
|
||||
- flutter build web --release --output=build/tm_pwa
|
||||
- ls -ltrh build/tm_pwa
|
||||
|
||||
- name: build pwa
|
||||
- name: build admin and push to artifactory
|
||||
image: plugins/docker
|
||||
settings:
|
||||
dockerfile: "Dockerfile"
|
||||
username: "cicd"
|
||||
# dockerfile: Dockerfile-admin
|
||||
username: cicd
|
||||
password:
|
||||
from_secret: "REGISTRY_PASSWORD"
|
||||
repo: "artifactory.ravanertebat.ir/tm/pwa"
|
||||
registry: "artifactory.ravanertebat.ir"
|
||||
build_args:
|
||||
- FLUTTER_VERSION=3.29.3
|
||||
- NGINX=1.25.2-alpine3.18-slim
|
||||
|
||||
from_secret: REGISTRY_PASSWORD
|
||||
repo: artifactory.ravanertebat.ir/tm/pwa
|
||||
registry: artifactory.ravanertebat.ir
|
||||
node:
|
||||
tag: aecde-docker-runner
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
- develop
|
||||
- master
|
||||
- uat
|
||||
- dev
|
||||
event:
|
||||
- custom
|
||||
- custom
|
||||
|
||||
Reference in New Issue
Block a user