Skip to content

Commit

Permalink
test 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DarylTodosichuk committed Oct 23, 2024
1 parent 7713540 commit 0bf9297
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Get variables
run: |
echo "target=$TARGET_ENV"
echo "base=${{env.TARGET_ENV}}"
echo "base=$GITHUB_REF_NAME"
echo "Environment: $TARGET_ENV OC_TARGET_PROJECT=$OC_TARGET_PROJECT"
echo "Environment: $TARGET_ENV JFROG_REPO_PATH=$JFROG_REPO_PATH"
echo "..."
Expand Down
48 changes: 46 additions & 2 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ on:
- 'SECURITY.md'

env:
TARGET_ENV: test
TARGET_ENV: test
GH_TOKEN: ${{secrets.GH_API_TOKEN}}
OC_CLUSTER: ${{ vars.OPENSHIFT_CLUSTER }}
OC_REGISTRY: ${{ vars.OPENSHIFT_REGISTRY }}
OC_AUTH_TOKEN: ${{ secrets.OPENSHIFT_TOKEN }}
Expand All @@ -30,6 +31,9 @@ env:
UGM_BUILD_VERSION: ${{vars.UGM_BUILD_VERSION}}
UGM_BUILD_REVISION: ${{vars.UGM_BUILD_REVISION}}

UGM_RELEASE_PREFIX: API_v
UGM_RELEASE_MESSAGE: "Test deployment"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
setup:
Expand All @@ -47,7 +51,47 @@ jobs:
echo "Environment: $TARGET_ENV JFROG_REPO_PATH=$JFROG_REPO_PATH"
echo "..."
env | sort
build:
GenerateTag:
needs: [Setup]
runs-on: ubuntu-latest
environment: test
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Get current date
id: date-selector
run: echo "date=$(date +'%B %e, %Y')" >> $GITHUB_OUTPUT
- name: Generate Next Git Tag
id: tag-selector
run: |
# Extract the major.minor.patch version parts using grep
MAJOR_VERSION=$(echo "${{env.UGM_BUILD_VERSION}}" | grep -oE '^[0-9]+')
MINOR_VERSION=$(echo "${{env.UGM_BUILD_VERSION}}" | grep -oE '\.[0-9]+\.' | grep -oE '[0-9]+')
VERSION_PATCH=$(echo "${{env.UGM_BUILD_VERSION}}" | grep -oE '[0-9]+$')
# Increment version elements
echo "${{env.UGM_RELEASE_PREFIX}}$MAJOR_VERSION.$MINOR_VERSION.$VERSION_PATCH"
MINOR_VERSION=$((MINOR_VERSION + 1))
echo "${{env.UGM_RELEASE_PREFIX}}$MAJOR_VERSION.$MINOR_VERSION.$VERSION_PATCH"
# Prepare tags
echo "gittag=${{env.UGM_RELEASE_PREFIX}}${MAJOR_VERSION}.${MINOR_VERSION}.${VERSION_PATCH}" >> $GITHUB_OUTPUT
echo "tagmsg=${{env.UGM_RELEASE_MESSAGE}} ${{steps.date-selector.outputs.date}}" >> $GITHUB_OUTPUT
echo "tagversion=$MAJOR_VERSION.$MINOR_VERSION.$VERSION_PATCH" >> $GITHUB_OUTPUT
- name: Create Git Tag
run: |
git config user.name "GitHub Actions"
git config user.email "github-actions@users.noreply.github.com"
git tag -a "${{steps.tag-selector.outputs.gittag}}" -m "${{steps.tag-selector.outputs.tagmsg}}"
git push origin "${{steps.tag-selector.outputs.gittag}}"
- name: Set repository version variable
id: setversion
run: |
gh variable list --env ${{env.TARGET_ENV}}
gh variable set UGM_BUILD_VERSION --env ${{env.TARGET_ENV}} --body "${{steps.tag-selector.outputs.tagversion}}"
gh variable list --env ${{env.TARGET_ENV}}
Build:
needs: [Setup,GenerateTag]
runs-on: ubuntu-latest
environment: test
steps:
Expand Down
3 changes: 2 additions & 1 deletion applications/scripts/datafix-ab#004.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ test4
test5
test6
test7
test8
test8
test9
Empty file.

0 comments on commit 0bf9297

Please sign in to comment.