Skip to content

Added event log config #788

Added event log config

Added event log config #788

Workflow file for this run

name: Create config archive
on:
push:
branches:
- develop
- "version/7.1" # don't use a glob-pattern here! Config-archives
- "version/7.2" # are only supported starting uberAgent 7.1
paths-ignore:
- "config-dist/**" # avoid recursion
pull_request:
branches:
- develop
- "version/7.1"
- "version/7.2"
paths-ignore:
- "config-dist/**" # avoid recursion
env:
SOURCE_DIR_PATH: config/
TARGET_DIR_PATH: config-dist/
TARGET_FILE: uberAgent.uAConfig
uAConfigCheck_FEED: uAConfigCheck
uAConfigCheck_Organization: https://dev.azure.com/vastlimits
uAConfigCheck_EXE_Artifact_Version: "*"
uAConfigCheck_EXE_Artifact_Package: uaconfigcheck
uAConfigCheck_DLL_Artifact_Version: "*"
uAConfigCheck_DLL_Artifact_ProductVersion:
${{ (github.ref == 'refs/heads/version/6.2' && '6.2.3')
|| (github.ref == 'refs/heads/version/7.0' && '7.0.2')
|| (github.ref == 'refs/heads/version/7.1' && '7.1.1')
|| 'develop' }}
uAConfigCheck_DLL_Artifact_Package: uberagent
jobs:
create-archive:
# Add "id-token" with the intended permissions.
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Create archive file
uses: thedoctor0/[email protected]
with:
type: "zip"
directory: "${{ env.SOURCE_DIR_PATH }}"
filename: "${{ env.TARGET_FILE }}"
# also upload the archive separately, so that we can commit it
- uses: actions/upload-artifact@v4
with:
name: ConfigArchive
path: "${{ env.SOURCE_DIR_PATH }}${{ env.TARGET_FILE }}"
retention-days: 1
- name: Move archive to target dir
run: |
# Print executed commands
set -x
mkdir -p "$TARGET_DIR_PATH"
rm -f "$TARGET_DIR_PATH$TARGET_FILE"
mv "$SOURCE_DIR_PATH$TARGET_FILE" "$TARGET_DIR_PATH"
- name: "Login via azure/login@v1"
uses: azure/login@v1
with:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
client-id: ${{ secrets.AZURE_CLIENT_ID }}
allow-no-subscriptions: true
environment: azurecloud
- name: download uAConfigCheck exe
uses: azure/CLI@v1
with:
azcliversion: 2.55.0
inlineScript: |
az extension add --name azure-devops
az artifacts universal download --organization ${{env.uAConfigCheck_Organization}} \
--project uAConfigCheck --scope project --feed ${{env.uAConfigCheck_FEED}} \
--name ${{env.uAConfigCheck_EXE_Artifact_Package}} \
--version "${{env.uAConfigCheck_EXE_Artifact_Version}}" \
--path . \
--file-filter 'uAConfigCheck.exe'
- name: download uAConfigCheck dll
uses: azure/CLI@v1
with:
azcliversion: 2.55.0
inlineScript: |
az extension add --name azure-devops
az artifacts universal download --organization ${{env.uAConfigCheck_Organization}} \
--project uAConfigCheck --scope project --feed ${{env.uAConfigCheck_FEED}} \
--name ${{env.uAConfigCheck_DLL_Artifact_Package}}-${{env.uAConfigCheck_DLL_Artifact_ProductVersion}} \
--version "${{env.uAConfigCheck_DLL_Artifact_Version}}" \
--path ./releases/ \
--file-filter "uberAgent-${{env.uAConfigCheck_DLL_Artifact_ProductVersion}}.dll"
- uses: actions/upload-artifact@v4
with:
name: uAConfigCheck
path: |
./uAConfigCheck.exe
./releases/uberAgent-${{env.uAConfigCheck_DLL_Artifact_ProductVersion}}.dll
retention-days: 1
# validate-archive:
# needs: [create-archive]
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - uses: actions/download-artifact@v4
# with:
# name: uAConfigCheck
#
# - uses: actions/download-artifact@v4
# with:
# name: ConfigArchive
#
# - name: "validate configuration uAConfigCheck"
# run: |
# .\uAConfigCheck.exe -w -v ${{env.uAConfigCheck_DLL_Artifact_ProductVersion}} -a "${{env.TARGET_FILE}}"
# continue-on-error: false
publish-archive:
if: ${{ github.event_name == 'push' }}
needs: [create-archive]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
token: ${{ secrets.VLSVC_PAT }}
- uses: actions/download-artifact@v4
with:
name: ConfigArchive
path: ${{ env.TARGET_DIR_PATH }}
- name: Check archive is in the target dir
run: |
# Print executed commands
set -x
echo "source+target:$SOURCE_DIR_PATH$TARGET_FILE\ntarget:$TARGET_DIR_PATH"
ls "$TARGET_DIR_PATH"
- name: Commit archive
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Updated config archive
commit_user_name: vastlimits
commit_user_email: [email protected]