chore: Update IntelliJ workspace settings and add GitHub Actions workflow for Docker deployment
This commit is contained in:
parent
da86c726db
commit
1c1aeb4519
5 changed files with 1470 additions and 5 deletions
164
.forgejo/workflows/deploy-docker.yaml
Normal file
164
.forgejo/workflows/deploy-docker.yaml
Normal file
|
|
@ -0,0 +1,164 @@
|
||||||
|
# .forgejo/workflows/deploy-docker.yaml
|
||||||
|
name: Prototype deployment
|
||||||
|
run-name: ${{ github.actor }} is deploying..
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
env:
|
||||||
|
API_VERSION: "unknown"
|
||||||
|
ENV: "develop"
|
||||||
|
DEBUG_WORKFLOW: "false"
|
||||||
|
IMAGE_TAG: forgejo.tooling.hilbigit.com/vcr/zabbix-graphql-api:${{ env.API_VERSION }}
|
||||||
|
jobs:
|
||||||
|
RunNpmBuildAndTestLocally:
|
||||||
|
runs-on:
|
||||||
|
- develop-build
|
||||||
|
container:
|
||||||
|
image: forgejo.tooling.hilbigit.com/omidevco/builder:latest
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
steps:
|
||||||
|
- name: Display current ref
|
||||||
|
run: "echo Current ref=${{ github.ref }}, ref_name=${{ github.ref_name }}, env.DEBUG_WORKFLOW=${{ env.DEBUG_WORKFLOW }}"
|
||||||
|
|
||||||
|
- name: Prepare apk packages
|
||||||
|
run: apk update && apk add --no-cache nodejs npm git
|
||||||
|
|
||||||
|
- name: Checkout (needs git)
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Run build + dry-run to test node prod installation
|
||||||
|
run: npm install;npm run compile;DRY_RUN=1 npm run prod
|
||||||
|
|
||||||
|
- name: Run test
|
||||||
|
if: ${{ vars.SKIP_TESTS != 'true' }}
|
||||||
|
run: npm run test
|
||||||
|
|
||||||
|
BuildAndPushDockerImage:
|
||||||
|
runs-on:
|
||||||
|
- develop-build
|
||||||
|
- docker
|
||||||
|
container:
|
||||||
|
image: forgejo.tooling.hilbigit.com/omidevco/builder:latest
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout (needs git)
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Determine and store version - all branches except prod
|
||||||
|
if: ${{ github.ref_name != 'prod' }}
|
||||||
|
run: |
|
||||||
|
API_VERSION="$(git describe --tags --always)"
|
||||||
|
LATEST_TAG=latest
|
||||||
|
echo "Building ${{ github.ref_name }}, apiVersion=${API_VERSION}, latestTag=${LATEST_TAG}, GITHUB_WORKSPACE=$GITHUB_WORKSPACE, storing in GITHUB_ENV=$GITHUB_ENV"
|
||||||
|
echo "API_VERSION=$API_VERSION" >> setApiVersion.sh
|
||||||
|
echo "LATEST_TAG=$LATEST_TAG" >> setApiVersion.sh
|
||||||
|
|
||||||
|
- name: Determine and store version - prod
|
||||||
|
if: ${{ github.ref_name == 'prod' }}
|
||||||
|
run: |
|
||||||
|
API_VERSION="$(git describe --tags --always)"
|
||||||
|
LATEST_TAG=latest-prod
|
||||||
|
echo "Building ${{ github.ref_name }}, apiVersion=${API_VERSION}, latestTag=${LATEST_TAG}, GITHUB_WORKSPACE=$GITHUB_WORKSPACE, storing in GITHUB_ENV=$GITHUB_ENV"
|
||||||
|
echo "API_VERSION=$API_VERSION" >> setApiVersion.sh
|
||||||
|
echo "LATEST_TAG=$LATEST_TAG" >> setApiVersion.sh
|
||||||
|
|
||||||
|
- name: Upload api version number
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: setApiVersion
|
||||||
|
path: setApiVersion.sh
|
||||||
|
|
||||||
|
- name: Set version number in $GITHUB_ENV
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
. ./setApiVersion.sh
|
||||||
|
echo "Building apiVersion=${API_VERSION}, latestTag=${LATEST_TAG}, storing in GITHUB_ENV=$GITHUB_ENV"
|
||||||
|
echo "API_VERSION=$API_VERSION" >> "$GITHUB_ENV"
|
||||||
|
echo "LATEST_TAG=$LATEST_TAG" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
if: ${{ github.ref_name == 'main' || github.ref_name == 'prod' || env.DEBUG_WORKFLOW == 'true' }}
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
platforms: linux/arm64
|
||||||
|
|
||||||
|
- name: Login to Forgejo Container Registry
|
||||||
|
if: ${{ github.ref_name == 'main' || github.ref_name == 'prod' || env.DEBUG_WORKFLOW == 'true' }}
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: forgejo.tooling.hilbigit.com
|
||||||
|
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Building and pushing image
|
||||||
|
if: ${{ github.ref_name == 'main' || github.ref_name == 'prod' || env.DEBUG_WORKFLOW == 'true' }}
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
build-args: |
|
||||||
|
API_VERSION=${{ env.API_VERSION }}
|
||||||
|
push: true
|
||||||
|
tags: ${{ env.IMAGE_TAG }}:${{ env.API_VERSION }}
|
||||||
|
platforms: linux/arm64
|
||||||
|
|
||||||
|
TriggerDeploymentAndSmoketest:
|
||||||
|
runs-on: docker-develop
|
||||||
|
needs:
|
||||||
|
- BuildAndPushDockerImage
|
||||||
|
- RunNpmBuildAndTestLocally
|
||||||
|
env:
|
||||||
|
ZABBIX_BASE_URL: "http://zabbix-web-internal:8080"
|
||||||
|
container:
|
||||||
|
image: forgejo.tooling.hilbigit.com/omidevco/builder:latest
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout (needs git)
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Prepare apk packages
|
||||||
|
run: apk update && apk add --no-cache curl
|
||||||
|
|
||||||
|
- name: Download version number
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: setApiVersion
|
||||||
|
|
||||||
|
- name: Set version number in $GITHUB_ENV
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
. ./setApiVersion.sh
|
||||||
|
echo "Building apiVersion=${API_VERSION}, latestTag=${LATEST_TAG}, storing in GITHUB_ENV=$GITHUB_ENV"
|
||||||
|
echo "API_VERSION=$API_VERSION" >> "$GITHUB_ENV"
|
||||||
|
echo "LATEST_TAG=$LATEST_TAG" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Login to Forgejo Container Registry
|
||||||
|
if: ${{ github.ref_name == 'main' || github.ref_name == 'prod' || env.DEBUG_WORKFLOW == 'true' }}
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: forgejo.tooling.hilbigit.com
|
||||||
|
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set latest tag
|
||||||
|
if: ${{ github.ref_name == 'main' || github.ref_name == 'prod' || env.DEBUG_WORKFLOW == 'true' }}
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
docker buildx imagetools create -t ${{ env.IMAGE_TAG }}:${LATEST_TAG} ${{ env.IMAGE_TAG }}:${API_VERSION}
|
||||||
|
|
||||||
|
- name: Trigger infrastructure project deployment
|
||||||
|
if: ${{ github.ref_name == 'main' || env.DEBUG_WORKFLOW == 'true' }}
|
||||||
|
run: |
|
||||||
|
forgejo_deploy_url=${{ github.api_url }}/repos/vcr/vcr-control-center-infrastructure/actions/workflows/call-deploy-apps-develop.yaml/dispatches
|
||||||
|
echo Deploying using $forgejo_deploy_url
|
||||||
|
curl -L "$forgejo_deploy_url" \
|
||||||
|
-X POST \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
-H "Authorization: token ${{ secrets.DEPLOY_TOKEN }}" \
|
||||||
|
--data "{\"ref\":\"refs/heads/${{ env.ENV }}\",\"inputs\":{ \"api_version\": \"${API_VERSION}\" }}"
|
||||||
14
.idea/deployment.xml
generated
Normal file
14
.idea/deployment.xml
generated
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="PublishConfigData" serverName="vcr-develop" remoteFilesAllowedToDisappearOnAutoupload="false">
|
||||||
|
<serverData>
|
||||||
|
<paths name="vcr-develop">
|
||||||
|
<serverdata>
|
||||||
|
<mappings>
|
||||||
|
<mapping local="$PROJECT_DIR$" web="/" />
|
||||||
|
</mappings>
|
||||||
|
</serverdata>
|
||||||
|
</paths>
|
||||||
|
</serverData>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
14
.idea/webServers.xml
generated
Normal file
14
.idea/webServers.xml
generated
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="WebServers">
|
||||||
|
<option name="servers">
|
||||||
|
<webServer id="cabc2703-a2cd-4a28-9f05-ab70ada6f492" name="vcr-develop">
|
||||||
|
<fileTransfer accessType="SFTP" host="vcr.develop.hilbigit.com" port="22" sshConfigId="04da3fb8-04f7-46cc-9d85-b43656b0c77b" sshConfig="hilbigit@vcr.develop.hilbigit.com:22" keyPair="true">
|
||||||
|
<advancedOptions>
|
||||||
|
<advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" />
|
||||||
|
</advancedOptions>
|
||||||
|
</fileTransfer>
|
||||||
|
</webServer>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
120
.idea/workspace.xml
generated
120
.idea/workspace.xml
generated
|
|
@ -1,8 +1,36 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
|
<component name="AutoImportSettings">
|
||||||
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
|
</component>
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="d7a71994-2699-4ae4-9fd2-ee13b7f33d35" name="Changes" comment="refactor!: Update Node.js version to 24.12.0, enhance GraphQL schema structure, and improve dynamic schema loading logic">
|
||||||
|
<change afterPath="$PROJECT_DIR$/.forgejo/workflows/deploy-docker.yaml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
</list>
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
<component name="ComposerSettings">
|
<component name="ComposerSettings">
|
||||||
<execution />
|
<execution />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="EmbeddingIndexingInfo">
|
||||||
|
<option name="cachedIndexableFilesCount" value="53" />
|
||||||
|
<option name="fileBasedEmbeddingIndicesEnabled" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="Git.Settings">
|
||||||
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="McpProjectServerCommands">
|
||||||
|
<commands />
|
||||||
|
<urls />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectColorInfo">{
|
||||||
|
"associatedIndex": 2
|
||||||
|
}</component>
|
||||||
|
<component name="ProjectId" id="38BVb3VzSAGgMQsmn4rSydxQ56L" />
|
||||||
<component name="ProjectViewState">
|
<component name="ProjectViewState">
|
||||||
<option name="autoscrollFromSource" value="true" />
|
<option name="autoscrollFromSource" value="true" />
|
||||||
<option name="autoscrollToSource" value="true" />
|
<option name="autoscrollToSource" value="true" />
|
||||||
|
|
@ -10,10 +38,92 @@
|
||||||
<option name="openDirectoriesWithSingleClick" value="true" />
|
<option name="openDirectoriesWithSingleClick" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"go.import.settings.migrated": "true",
|
"NIXITCH_NIXPKGS_CONFIG": "",
|
||||||
"settings.editor.selected.configurable": "ssh.settings"
|
"NIXITCH_NIX_CONF_DIR": "",
|
||||||
|
"NIXITCH_NIX_OTHER_STORES": "",
|
||||||
|
"NIXITCH_NIX_PATH": "",
|
||||||
|
"NIXITCH_NIX_PROFILES": "",
|
||||||
|
"NIXITCH_NIX_REMOTE": "",
|
||||||
|
"NIXITCH_NIX_USER_PROFILE_DIR": "",
|
||||||
|
"Node.js.index.ts.executor": "Run",
|
||||||
|
"RunOnceActivity.MCP Project settings loaded": "true",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
|
||||||
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
|
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||||
|
"git-widget-placeholder": "main",
|
||||||
|
"go.import.settings.migrated": "true",
|
||||||
|
"javascript.preferred.runtime.type.id": "node",
|
||||||
|
"last_opened_file_path": "//wsl.localhost/Ubuntu/home/ahilbig/git/vcr/zabbix-graphql-api/.forgejo/workflows",
|
||||||
|
"node.js.detected.package.eslint": "true",
|
||||||
|
"node.js.detected.package.tslint": "true",
|
||||||
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
|
"nodejs_interpreter_path": "wsl://Ubuntu@/home/ahilbig/.nvm/versions/node/v24.12.0/bin/node",
|
||||||
|
"nodejs_package_manager_path": "npm",
|
||||||
|
"settings.editor.selected.configurable": "settings.typescriptcompiler",
|
||||||
|
"ts.external.directory.path": "\\\\wsl.localhost\\Ubuntu\\home\\ahilbig\\git\\vcr\\zabbix-graphql-api\\node_modules\\typescript\\lib",
|
||||||
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}</component>
|
}]]></component>
|
||||||
|
<component name="RecapSpentCounter">
|
||||||
|
<option name="endsOfQuotaMs" value="1768327208764" />
|
||||||
|
<option name="spentUsd" value="0.026222099" />
|
||||||
|
</component>
|
||||||
|
<component name="RecapUselessUpdatesCounter">
|
||||||
|
<option name="suspendCountdown" value="3" />
|
||||||
|
</component>
|
||||||
|
<component name="RecentsManager">
|
||||||
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
<recent name="\\wsl.localhost\Ubuntu\home\ahilbig\git\vcr\zabbix-graphql-api\.forgejo\workflows" />
|
||||||
|
<recent name="\\wsl.localhost\Ubuntu\home\ahilbig\git\vcr\zabbix-graphql-api" />
|
||||||
|
</key>
|
||||||
|
</component>
|
||||||
|
<component name="RunManager" selected="Node.js.index.ts">
|
||||||
|
<list>
|
||||||
|
<item itemvalue="Node.js.index.ts" />
|
||||||
|
<item itemvalue="npm.codegen" />
|
||||||
|
<item itemvalue="npm.compile" />
|
||||||
|
</list>
|
||||||
|
</component>
|
||||||
|
<component name="SharedIndexes">
|
||||||
|
<attachedChunks>
|
||||||
|
<set>
|
||||||
|
<option value="bundled-js-predefined-d6986cc7102b-9b0f141eb926-JavaScript-WS-253.29346.242" />
|
||||||
|
</set>
|
||||||
|
</attachedChunks>
|
||||||
|
</component>
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="d7a71994-2699-4ae4-9fd2-ee13b7f33d35" name="Changes" comment="" />
|
||||||
|
<created>1768273021451</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1768273021451</updated>
|
||||||
|
<workItem from="1768273025985" duration="6749000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="3" />
|
||||||
|
</component>
|
||||||
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
<option name="TAB_STATES">
|
||||||
|
<map>
|
||||||
|
<entry key="MAIN">
|
||||||
|
<value>
|
||||||
|
<State />
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="VcsManagerConfiguration">
|
||||||
|
<MESSAGE value="refactor!: Update Node.js version to 24.12.0, enhance GraphQL schema structure, and improve dynamic schema loading logic" />
|
||||||
|
<MESSAGE value="refactor!: Cleanup zabbix api access and remove unused classes; Restructure grapqhl-schema to better align with clean code and project structure principles;Rename "devices" to "hosts" in "exportHistory" - operation. Prepare extraction of device specific types and alignment with integration layer" />
|
||||||
|
<MESSAGE value="refactor!: Rename "devices" to "hosts" in "exportHistory" - operation. Cleanup zabbix api access and remove unused classes Restructure grapqhl-schema to better align with clean code and project structure principles" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="refactor!: Rename "devices" to "hosts" in "exportHistory" - operation. Cleanup zabbix api access and remove unused classes Restructure grapqhl-schema to better align with clean code and project structure principles" />
|
||||||
|
</component>
|
||||||
</project>
|
</project>
|
||||||
1163
src/schema/generated/graphql.ts
Normal file
1163
src/schema/generated/graphql.ts
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue