Skip to content

Commit

Permalink
final tocuhes
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Cotoman authored and Victor Cotoman committed Oct 1, 2023
1 parent 6ead43e commit 4b0ff0a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 23 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
- qa
- prod
- rc

jobs:
build:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
run: |
BRANCH_NAME=$(echo ${GITHUB_REF##*/} | tr / -)
TAG_NAME="0.0.0" # Adding default tag for main as 0.0.0
echo "BRANCH_NAME: ${BRANCH_NAME}"
if [ "$BRANCH_NAME" == "main" ]; then
LAST_TAG=$(git tag -l "0.*" | sort -V | tail -n 1)
if [ -z "$LAST_TAG" ]; then
Expand All @@ -53,7 +53,7 @@ jobs:
NEW_PATCH_VERSION=$((PATCH_VERSION + 1))
TAG_NAME="0.1.$NEW_PATCH_VERSION"
fi
elif [ "$BRANCH_NAME" == "prod" ]; then
elif [ "$BRANCH_NAME" == "rc" ]; then
LAST_TAG=$(git tag -l "1.*" | sort -V | tail -n 1)
if [ -z "$LAST_TAG" ]; then
TAG_NAME="1.0.0"
Expand All @@ -74,14 +74,14 @@ jobs:
- name: Create Git Tag
run: |
if [ "$BRANCH_NAME" == "main" ] || [ "$BRANCH_NAME" == "prod" ]; then
# if [ "$BRANCH_NAME" == "main" ] || [ "$BRANCH_NAME" == "rc" ]; then
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git tag ${{ env.TAG_NAME }}
git push origin ${{ env.TAG_NAME }}
else
echo "Main branch detected, skipping tag"
fi
# else
# echo "Main branch detected, skipping tag"
# fi
- name: Install Helm
run: |
Expand Down
6 changes: 4 additions & 2 deletions fluxcd/clusters/poc/dev/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ metadata:
name: app
spec:
interval: 10m
releaseName: dummyapp
releaseName: app
chart:
spec:
chart: nodejs
sourceRef:
kind: HelmRepository
name: ecr
namespace: flux-system
version: ">=0.1.0"
version: ">=0.1.0"
values:
network: rinkeby
2 changes: 1 addition & 1 deletion fluxcd/clusters/poc/prod/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: app
spec:
interval: 10m
releaseName: dummyapp
releaseName: app
chart:
spec:
chart: nodejs
Expand Down
8 changes: 0 additions & 8 deletions helm/nodejs/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ spec:
- name: http
containerPort: 3000
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
7 changes: 3 additions & 4 deletions helm/nodejs/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
- protocol: TCP
port: 80
targetPort: 3000
selector:
{{- include "nodejs.selectorLabels" . | nindent 4 }}
2 changes: 1 addition & 1 deletion helm/nodejs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ securityContext: {}

service:
type: ClusterIP
port: 80
port: 3000

ingress:
enabled: false
Expand Down

0 comments on commit 4b0ff0a

Please sign in to comment.