Compare commits
No commits in common. "main" and "v1.1.32" have entirely different histories.
30
.github/workflows/cs-update-push.yml
vendored
30
.github/workflows/cs-update-push.yml
vendored
@ -21,20 +21,10 @@ jobs:
|
|||||||
name: Read the issue comment
|
name: Read the issue comment
|
||||||
run: |
|
run: |
|
||||||
ISSUE_COMMENT_STRING='${{ github.event.comment.body }}'
|
ISSUE_COMMENT_STRING='${{ github.event.comment.body }}'
|
||||||
TAG=`echo $ISSUE_COMMENT_STRING | jq -r ".tag"`
|
TAG=`echo $ISSUE_COMMENT_STRING | jq ".tag"`
|
||||||
REPO=`echo $ISSUE_COMMENT_STRING | jq -r ".repo"`
|
REPO=`echo $ISSUE_COMMENT_STRING | jq ".repo"`
|
||||||
SENDER=`echo $ISSUE_COMMENT_STRING | jq -r ".sender"`
|
SENDER=`echo $ISSUE_COMMENT_STRING | jq ".sender"`
|
||||||
|
DOCKER_REPO=${{ vars.docker_repo2_registry }}/$REPO_NAME
|
||||||
# Try to extract docker_repo from issue comment, fallback to default variable
|
|
||||||
DOCKER_REPO_FROM_COMMENT=`echo $ISSUE_COMMENT_STRING | jq -r ".docker_repo"`
|
|
||||||
if [ -n "$DOCKER_REPO_FROM_COMMENT" ] && [ "$DOCKER_REPO_FROM_COMMENT" != "null" ]; then
|
|
||||||
DOCKER_REPO=$DOCKER_REPO_FROM_COMMENT/$REPO
|
|
||||||
echo "Using docker_repo from issue comment: $DOCKER_REPO"
|
|
||||||
else
|
|
||||||
DOCKER_REPO=${{ vars.docker_repo2_registry }}/$REPO
|
|
||||||
echo "Using fallback docker_repo: $DOCKER_REPO"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "TAG=$TAG" >> "$GITHUB_OUTPUT";
|
echo "TAG=$TAG" >> "$GITHUB_OUTPUT";
|
||||||
echo "REPO=$REPO" >> "$GITHUB_OUTPUT";
|
echo "REPO=$REPO" >> "$GITHUB_OUTPUT";
|
||||||
echo "SENDER=$SENDER" >> "$GITHUB_OUTPUT";
|
echo "SENDER=$SENDER" >> "$GITHUB_OUTPUT";
|
||||||
@ -62,7 +52,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github-server-url: ${{ github.server_url }}
|
github-server-url: ${{ github.server_url }}
|
||||||
repository: gmetribin/deploy-tools
|
repository: gmetribin/deploy-tools
|
||||||
ref: v1.1.42
|
ref: v1.1.29
|
||||||
path: deploy-tools
|
path: deploy-tools
|
||||||
# token: $\{{ github.token }} # DEFAULT / Any pushes with github.token don't trigger a chained build
|
# token: $\{{ github.token }} # DEFAULT / Any pushes with github.token don't trigger a chained build
|
||||||
|
|
||||||
@ -73,14 +63,18 @@ jobs:
|
|||||||
git config --global user.email 'techbots+build@gmetri.com'
|
git config --global user.email 'techbots+build@gmetri.com'
|
||||||
|
|
||||||
TAG=${{ steps.read-issue.outputs.TAG }}
|
TAG=${{ steps.read-issue.outputs.TAG }}
|
||||||
export REPO=${{ steps.read-issue.outputs.REPO }}
|
REPO=${{ steps.read-issue.outputs.REPO }}
|
||||||
export SENDER=${{ steps.read-issue.outputs.SENDER }}
|
SENDER=${{ steps.read-issue.outputs.SENDER }}
|
||||||
DOCKER_REPO=${{ steps.read-issue.outputs.DOCKER_REPO }}
|
DOCKER_REPO=${{ steps.read-issue.outputs.DOCKER_REPO }}
|
||||||
REPOLIST=./.github/repolist.txt
|
REPOLIST=./.github/repolist.txt
|
||||||
pwd; ls -al;
|
pwd; ls -al;
|
||||||
|
|
||||||
cd cs;
|
cd cs;
|
||||||
../deploy-tools/src/repo_to_cs.sh -m $DOCKER_REPO -t $TAG -r $REPOLIST;
|
source ../deploy-tools/src/repo_to_cs.sh -m $DOCKER_REPO -t $TAG -r $REPOLIST;
|
||||||
|
echo "NEW_TAG: $NEW_TAG"
|
||||||
|
COMMIT_MESSAGE="$NEW_TAG: $REPO to $TAG by $SENDER";
|
||||||
|
|
||||||
|
git commit -m "$COMMIT_MESSAGE"
|
||||||
|
git tag -a $NEW_TAG -m "$COMMIT_MESSAGE"
|
||||||
git push origin main;
|
git push origin main;
|
||||||
git push --tags origin main;
|
git push --tags origin main;
|
||||||
|
|||||||
12
.github/workflows/cs-update-trigger.yml
vendored
12
.github/workflows/cs-update-trigger.yml
vendored
@ -9,10 +9,6 @@ on:
|
|||||||
description: 'The cs repo that contains this image'
|
description: 'The cs repo that contains this image'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
docker_repo:
|
|
||||||
description: 'The name of the action variable containing the docker repo value'
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
trigger-cs-job:
|
trigger-cs-job:
|
||||||
@ -25,19 +21,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
SHA=${{ github.sha }}; BRANCH_NAME=${{ github.base_ref || github.ref_name }};
|
SHA=${{ github.sha }}; BRANCH_NAME=${{ github.base_ref || github.ref_name }};
|
||||||
BUILD_ID=$BRANCH_NAME-${SHA:0:8};
|
BUILD_ID=$BRANCH_NAME-${SHA:0:8};
|
||||||
REPO=${{ github.repository }};
|
echo "REPO=${{ github.repository }} >> $GITHUB_OUTPUT"
|
||||||
echo "REPO=$REPO" >> "$GITHUB_OUTPUT";
|
|
||||||
echo "TAG=$BUILD_ID" >> "$GITHUB_OUTPUT";
|
echo "TAG=$BUILD_ID" >> "$GITHUB_OUTPUT";
|
||||||
|
|
||||||
- name: Print repo and tag
|
- name: Print repo and build_id
|
||||||
run: |
|
run: |
|
||||||
echo "REPO: ${{ steps.get-id.outputs.REPO }}";
|
echo "REPO: ${{ steps.get-id.outputs.REPO }}";
|
||||||
echo "TAG: ${{ steps.get-id.outputs.TAG }}";
|
echo "TAG: ${{ steps.get-id.outputs.TAG }}";
|
||||||
|
|
||||||
- name: Push image name and tag to cs repo's latest issue with label workflow
|
- name: Push image name and tag to cs repo's latest issue with label workflow
|
||||||
run: |
|
run: |
|
||||||
DOCKER_REPO_VALUE="${{ vars[inputs.docker_repo] }}"
|
ISSUE_COMMENT_STRING=`echo "{ \"repo\": \"${{ steps.get-id.outputs.REPO }}"\, \"tag\": \"${{ steps.get-id.outputs.TAG }}\", \"sender\": \"${{ github.event.sender.login }}\" }" | jq tostring`
|
||||||
ISSUE_COMMENT_STRING=`echo "{ \"docker_repo\": \"$DOCKER_REPO_VALUE\", \"repo\": \"${{ steps.get-id.outputs.REPO }}\", \"tag\": \"${{ steps.get-id.outputs.TAG }}\", \"sender\": \"${{ github.event.sender.login }}\" }" | jq tostring`
|
|
||||||
echo ISSUE_COMMENT_STRING: $ISSUE_COMMENT_STRING
|
echo ISSUE_COMMENT_STRING: $ISSUE_COMMENT_STRING
|
||||||
|
|
||||||
API_JSON_BODY=`echo '{"body": '$ISSUE_COMMENT_STRING' }' | jq -r tostring`
|
API_JSON_BODY=`echo '{"body": '$ISSUE_COMMENT_STRING' }' | jq -r tostring`
|
||||||
|
|||||||
2
.github/workflows/nm-update.yml
vendored
2
.github/workflows/nm-update.yml
vendored
@ -61,7 +61,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github-server-url: ${{ github.server_url }}
|
github-server-url: ${{ github.server_url }}
|
||||||
repository: gmetribin/deploy-tools
|
repository: gmetribin/deploy-tools
|
||||||
ref: v1.1.42
|
ref: v1.1.19
|
||||||
path: deploy-tools
|
path: deploy-tools
|
||||||
|
|
||||||
- name: Increment cs version in nm repo and push
|
- name: Increment cs version in nm repo and push
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -129,4 +129,4 @@ dist
|
|||||||
.yarn/build-state.yml
|
.yarn/build-state.yml
|
||||||
.yarn/install-state.gz
|
.yarn/install-state.gz
|
||||||
.pnp.*
|
.pnp.*
|
||||||
.idea/
|
|
||||||
|
|||||||
15
repo-template/cs-repo/.editorconfig
Normal file
15
repo-template/cs-repo/.editorconfig
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# EditorConfig is awesome: http://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# Unix-style newlines with a newline ending every file
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
indent_style = space
|
||||||
|
|
||||||
|
# Matches multiple files with brace expansion notation
|
||||||
|
# Set default charset
|
||||||
|
[*.{js,json,ts,py,sh,md,yml,yaml,njk}]
|
||||||
|
charset = utf-8
|
||||||
|
indent_size = 2
|
||||||
0
repo-template/cs-repo/.github/archive/.gitkeep
vendored
Normal file
0
repo-template/cs-repo/.github/archive/.gitkeep
vendored
Normal file
8
repo-template/cs-repo/.github/repolist.txt
vendored
Normal file
8
repo-template/cs-repo/.github/repolist.txt
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#Place this in .github/repolist.txt
|
||||||
|
#repo list
|
||||||
|
#FORMAT: image_name kustomization.yaml_path
|
||||||
|
## Used when the main branch of some repo gets built
|
||||||
|
|
||||||
|
repo2.hub.gmetri.io/gmetrivr/fs-ui ui/ui-1main/kustomization.yaml
|
||||||
|
repo2.hub.gmetri.io/gmetrivr/fs-learn-ui ui/ui-1main/kustomization.yaml
|
||||||
|
repo2.hub.gmetri.io/gmetrivr/dt-ui ui/ui-1main/kustomization.yaml
|
||||||
11
repo-template/cs-repo/.github/workflows/cs-update-push.yml
vendored
Normal file
11
repo-template/cs-repo/.github/workflows/cs-update-push.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
name: Update Repo Version
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
cs-update-push:
|
||||||
|
uses: gmetribin/deploy-tools/.github/workflows/cs-update-push.yml@v1.1.21
|
||||||
|
secrets: inherit
|
||||||
14
repo-template/cs-repo/.github/workflows/nm-update-1dev.yml
vendored
Normal file
14
repo-template/cs-repo/.github/workflows/nm-update-1dev.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
name: Deploy to dev
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push: # Push events on every tag / only for nm-dev
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nm-update-dev:
|
||||||
|
uses: gmetribin/deploy-tools/.github/workflows/nm-update.yml@v1.1.21
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
nm_repo: gmetrivr/nm-dev
|
||||||
11
repo-template/cs-repo/.github/workflows/nm-update-2rc.yml
vendored
Normal file
11
repo-template/cs-repo/.github/workflows/nm-update-2rc.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
name: Deploy to rc
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nm-update-rc:
|
||||||
|
uses: gmetribin/deploy-tools/.github/workflows/nm-update.yml@v1.1.21
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
nm_repo: gmetrivr/nm-rc
|
||||||
11
repo-template/cs-repo/.github/workflows/nm-update-3prod.yml
vendored
Normal file
11
repo-template/cs-repo/.github/workflows/nm-update-3prod.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
name: Deploy to prod
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nm-update-prod:
|
||||||
|
uses: gmetribin/deploy-tools/.github/workflows/nm-update.yml@v1.1.21
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
nm_repo: gmetrivr/nm-prod
|
||||||
132
repo-template/cs-repo/.gitignore
vendored
Normal file
132
repo-template/cs-repo/.gitignore
vendored
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
# ---> Node
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# Snowpack dependency directory (https://snowpack.dev/)
|
||||||
|
web_modules/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional stylelint cache
|
||||||
|
.stylelintcache
|
||||||
|
|
||||||
|
# Microbundle cache
|
||||||
|
.rpt2_cache/
|
||||||
|
.rts2_cache_cjs/
|
||||||
|
.rts2_cache_es/
|
||||||
|
.rts2_cache_umd/
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variable files
|
||||||
|
.env
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
.env.local
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
.parcel-cache
|
||||||
|
|
||||||
|
# Next.js build output
|
||||||
|
.next
|
||||||
|
out
|
||||||
|
|
||||||
|
# Nuxt.js build / generate output
|
||||||
|
.nuxt
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Gatsby files
|
||||||
|
.cache/
|
||||||
|
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||||
|
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||||
|
# public
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# vuepress v2.x temp and cache directory
|
||||||
|
.temp
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# Docusaurus cache and generated files
|
||||||
|
.docusaurus
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# TernJS port file
|
||||||
|
.tern-port
|
||||||
|
|
||||||
|
# Stores VSCode versions used for testing VSCode extensions
|
||||||
|
.vscode-test
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
|
.yarn/build-state.yml
|
||||||
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
|
.idea/
|
||||||
@ -39,12 +39,10 @@ main()
|
|||||||
done <<< "$KUST_FILES_LINES"
|
done <<< "$KUST_FILES_LINES"
|
||||||
|
|
||||||
source $SCRIPT_DIR/repo_to_cs_basetag.sh;
|
source $SCRIPT_DIR/repo_to_cs_basetag.sh;
|
||||||
|
# cat $NEW_TAG > version; #To always allow a commit
|
||||||
echo "NEW_TAG: $NEW_TAG"
|
# git add version;
|
||||||
COMMIT_MESSAGE="$NEW_TAG: $REPO to $IMAGE_TAG by $SENDER";
|
# git commit -m "$NEW_TAG: $IMAGE updated to $IMAGE_TAG";
|
||||||
|
# git tag -a $NEW_TAG -m "$NEW_TAG: $IMAGE updated to $IMAGE_TAG"
|
||||||
git commit -m "$COMMIT_MESSAGE"
|
|
||||||
git tag -a $NEW_TAG -m "$COMMIT_MESSAGE"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
### Starts here
|
### Starts here
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user