Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/action build #38

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-ia-frontend-dispatch-shared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
verlt(){
[ "$1" = "$2" ] && return 1 || verlte $1 $2
}
export PROJECT_DIR="inteligencia-artificial" PATCH_TARGET="deployment-platform-frontend.json"
export PROJECT_DIR="platform-frontend" PATCH_TARGET="deployment-platform-frontend.json"
ENV_DIR=$(
find kubernetes-manifests/${PROJECT_DIR}/ -maxdepth 1 -mindepth 1 -type d \
| egrep -v -e '.git' -e '/base$' \
Expand Down
43 changes: 20 additions & 23 deletions .github/workflows/build-ia-frontend-push-tag-shared.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build IA Platform Frontend (Push Tag)
name: Build IA Platform Frontend (Push Branch)

on:
push:
tags:
- 'v*.*.*-develop*'
- 'v*.*.*-staging*'
- 'v*.*.*'
branches:
- develop
- staging
- production

jobs:
docker:
Expand All @@ -15,7 +15,7 @@ jobs:
- name: Set variables
run: |
TAG=$(echo $GITHUB_REF|cut -d"/" -f3)
if $(echo $TAG|grep --silent -e 'v*.*.*-develop*')
if $(echo $TAG|grep --silent -e 'develop')
then
echo "Found environment: DEVELOP - $TAG"
echo "MANIFESTS_ENVIRONMENT=develop" >> $GITHUB_ENV
Expand All @@ -27,9 +27,7 @@ jobs:
echo "VERSION=$VERSION"
echo "COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV
echo "COMMIT_SHA=$GITHUB_SHA"
echo "IMAGE_TAG=bothubit/platform-frontend:$TAG" >> $GITHUB_ENV
echo "IMAGE_TAG=bothubit/platform-frontend:$TAG"
elif $(echo $TAG|grep --silent -e 'v*.*.*-staging*')
elif $(echo $TAG|grep --silent -e 'staging')
then
echo "Found environment: STAGING - $TAG"
echo "MANIFESTS_ENVIRONMENT=staging" >> $GITHUB_ENV
Expand All @@ -41,9 +39,7 @@ jobs:
echo "VERSION=$VERSION"
echo "COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV
echo "COMMIT_SHA=$GITHUB_SHA"
echo "IMAGE_TAG=bothubit/platform-frontend:$TAG" >> $GITHUB_ENV
echo "IMAGE_TAG=bothubit/platform-frontend:$TAG"
elif $(echo $TAG|grep --silent -e 'v*.*.*')
elif $(echo $TAG|grep --silent -e 'production')
then
echo "No environment found, assuming: PRODUCTION - $TAG"
echo "MANIFESTS_ENVIRONMENT=production" >> $GITHUB_ENV
Expand All @@ -55,12 +51,12 @@ jobs:
echo "VERSION=$VERSION"
echo "COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV
echo "COMMIT_SHA=$GITHUB_SHA"
echo "IMAGE_TAG=bothubit/platform-frontend:$TAG" >> $GITHUB_ENV
echo "IMAGE_TAG=bothubit/platform-frontend:$TAG"
else
echo 'Not a valid tag. Skipping...'
exit 1
fi
echo "IMAGE_TAG=bothubit/platform-frontend:$TAG-${GITHUB_SHA::7}" >> $GITHUB_ENV
echo "IMAGE_TAG=bothubit/platform-frontend:$TAG-${GITHUB_SHA::7}"

- name: Check out the repo
uses: actions/checkout@v2
Expand Down Expand Up @@ -138,14 +134,15 @@ jobs:
verlt(){
[ "$1" = "$2" ] && return 1 || verlte $1 $2
}
export PROJECT_DIR="inteligencia-artificial" PATCH_TARGET="deployment-platform-frontend.json"
ENV_DIR=$(
find kubernetes-manifests/${PROJECT_DIR}/ -maxdepth 1 -mindepth 1 -type d \
| egrep -v -e '.git' -e '/base$' \
| while read dirname ; do
test -r "${dirname}/kustomization.yaml" && echo "${dirname}"
done
)
export PROJECT_DIR="platform-frontend" PATCH_TARGET="deployment-platform-frontend.json"
# ENV_DIR=$(
# find kubernetes-manifests/${PROJECT_DIR}/ -maxdepth 1 -mindepth 1 -type d \
# | egrep -v -e '.git' -e '/base$' \
# | while read dirname ; do
# test -r "${dirname}/kustomization.yaml" && echo "${dirname}"
# done
# )
ENV_DIR="${MANIFESTS_ENVIRONMENT}"
for e in ${ENV_DIR}; do
echo "Update ${e}:"
if [ ! -d "${e}" ] ; then
Expand Down Expand Up @@ -185,7 +182,7 @@ jobs:
with:
github_token: ${{ secrets.DEVOPS_GITHUB_PERMANENT_TOKEN }}
repository: Ilhasoft/kubernetes-manifests-artificial-intelligence
directory: ./kubernetes-manifests/
directory: ./platform-frontend/
branch: main
message: "From IA Frontend Build (Push-Tag)"

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@mdi/font": "^5.2.45",
"@sentry/browser": "^5.29.2",
"@sentry/integrations": "^5.29.2",
"@weni/unnnic-system": "1.1.58",
"@weni/unnnic-system": "1.5.6",
"ansi-regex": "5.0.1",
"axios": "0.21.2",
"buefy": "^0.9.4",
Expand Down
2 changes: 2 additions & 0 deletions public/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const runtimeVariables = (() => ({
VUE_APP_HELPHERO_ID: 'm7dO0to4OK',
VUE_APP_HELPHERO_TOUR: 'ZlUBE8O2Ik',
VUE_APP_QA_FLOW_CHANNEL: '4c46585b-8393-415b-856a-280c7d9ca9af',
VUE_APP_LOGROCKET_ID: 'weni/develop',
VUE_APP_LOGROCKET_PARENT_DOMAIN: 'https://dash-develop.weni.ai/',

get(name) {
return this[name];
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div id="app">
<news-modal />
<!-- <news-modal /> -->
<router-view />
<!-- <tutorial-modal
:open="activeMenu"/> -->
Expand Down
Loading