tnx-shared 5.2.8 → 5.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +0,0 @@
1
- FROM euniversitytnapi/tn.clientbase.angular
2
- ARG app_name_lower_case
3
- RUN rm -rf /usr/share/nginx/html/*
4
- COPY ./dist/${app_name_lower_case} /usr/share/nginx/html
5
- CMD ["nginx", "-g", "daemon off;"]
@@ -1,42 +0,0 @@
1
- #!/bin/bash
2
-
3
- while [ "$1" != "" ]; do
4
- case $1 in
5
- -a | --appname)
6
- shift
7
- appname=$1
8
- ;;
9
- -e | --environment)
10
- shift
11
- env=${1/\//-} # Replace dấu / thành - để đánh tag name không bị lỗi. ví dụ feature/feature-1 -> feature-feature-1
12
- ;;
13
- -scope | --scope)
14
- shift
15
- scope=$1
16
- ;;
17
- -imageSuffix | --image-suffix)
18
- shift
19
- suffix=$1
20
- ;;
21
- -tagOnly | --tag-only)
22
- shift
23
- tagonly=$1
24
- ;;
25
- -fromEnvironment | --from-environment)
26
- shift
27
- fromenv=$1
28
- ;;
29
- esac
30
- shift
31
- done
32
-
33
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASS $DOCKER_REGISTRY_SERVER
34
- if ! ($tagonly); then
35
- docker build --build-arg app_name_lower_case=${appname,,} -f Dockerfile.ci -t $DOCKER_REGISTRY_SERVER/$scope/${appname,,}$suffix:$CORE_VERSION-$env .
36
- docker push $DOCKER_REGISTRY_SERVER/$scope/${appname,,}$suffix:$CORE_VERSION-$env
37
- docker tag $DOCKER_REGISTRY_SERVER/$scope/${appname,,}$suffix:$CORE_VERSION-$env $DOCKER_REGISTRY_SERVER/$scope/${appname,,}$suffix:$CORE_VERSION-$env-$IMAGE_VERSION
38
- docker push $DOCKER_REGISTRY_SERVER/$scope/${appname,,}$suffix:$CORE_VERSION-$env-$IMAGE_VERSION
39
- else
40
- docker tag $DOCKER_REGISTRY_SERVER/$scope/${appname,,}$suffix:$CORE_VERSION-$fromenv $DOCKER_REGISTRY_SERVER/$scope/${appname,,}$suffix:$CORE_VERSION-$env-$IMAGE_VERSION
41
- docker push $DOCKER_REGISTRY_SERVER/$scope/${appname,,}$suffix:$CORE_VERSION-$env-$IMAGE_VERSION
42
- fi