Skip to content

Commit

Permalink
Merge branch 'master' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
aarshi0301 committed Dec 11, 2024
2 parents 21e72d1 + 60d95fe commit 6485bcc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Cache Maven packages
uses: actions/cache@v2
with:
Expand All @@ -51,9 +51,8 @@ jobs:

- name: Get branch name
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "##[set-output name=branch_lower;]$(echo ${GITHUB_REF#refs/heads/} | awk '{gsub("/", "-"); print tolower($0)}')"
id: get_branch
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo BRANCH_NAME=${GITHUB_REF#refs/heads/}
- name: Create Maven Settings
uses: s4u/[email protected]
Expand All @@ -67,8 +66,8 @@ jobs:
- name: Build with Maven
run: |
branch_name=${{ steps.get_branch.outputs.branch }}
if [[ $branch_name == 'main' || $branch_name == 'master' || $branch_name == 'revert3773dg1924' || $branch_name == 'dg1908' ]]
branch_name=${{ env.BRANCH_NAME }}
if [[ $branch_name == 'main' || $branch_name == 'master' || $branch_name == 'lineageondemand' ]]
then
echo "build without dashboard"
chmod +x ./build.sh && ./build.sh build_without_dashboard
Expand All @@ -77,19 +76,26 @@ jobs:
chmod +x ./build.sh && ./build.sh
fi
- run: echo "REPOSITORY_NAME=`echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//"`" >> $GITHUB_ENV
- name: Get Repository Name
run: echo "REPOSITORY_NAME=`echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//"`" >> $GITHUB_ENV
shell: bash

- name: Get version tag
run: echo "##[set-output name=version;]$(echo `git ls-remote https://${{ secrets.ORG_PAT_GITHUB }}@github.com/atlanhq/${REPOSITORY_NAME}.git refs/heads/${{ steps.get_branch.outputs.branch }} | awk '{ print $1}' | cut -c1-7`)abcd"
id: get_version
# run: echo "##[set-output name=version;]$(echo `git ls-remote https://${{ secrets.ORG_PAT_GITHUB }}@github.com/atlanhq/${REPOSITORY_NAME}.git ${{ env.BRANCH_NAME }} | awk '{ print $1}' | cut -c1-7`)abcd"
run: |
echo "VERSION=$(git ls-remote https://${{ secrets.ORG_PAT_GITHUB }}@github.com/atlanhq/${REPOSITORY_NAME}.git ${{ env.BRANCH_NAME }} | awk '{ print $1}' | cut -c1-7 | head -n 1)abcd"
echo "VERSION=$(git ls-remote https://${{ secrets.ORG_PAT_GITHUB }}@github.com/atlanhq/${REPOSITORY_NAME}.git ${{ env.BRANCH_NAME }} | awk '{ print $1}' | cut -c1-7 | tr -d '[:space:]')abcd"
echo "VERSION=$(git ls-remote https://${{ secrets.ORG_PAT_GITHUB }}@github.com/atlanhq/${REPOSITORY_NAME}.git ${{ env.BRANCH_NAME }} | awk '{ print $1}' | cut -c1-7 | tr -d '[:space:]')abcd" >> $GITHUB_ENV
- name: Get commit ID
run: echo "COMMIT_ID=$(echo ${GITHUB_SHA} | cut -c1-7)abcd" >> $GITHUB_ENV

- name: Set up Buildx
- name: Set up Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Registry
uses: docker/login-action@v1
uses: docker/login-action@v1
with:
registry: ghcr.io
username: $GITHUB_ACTOR
Expand All @@ -106,8 +112,8 @@ jobs:
provenance: true
push: true
tags: |
ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ steps.get_branch.outputs.branch_lower }}:latest
ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ steps.get_branch.outputs.branch_lower }}:${{ steps.get_version.outputs.version }}
ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ env.BRANCH_NAME }}:latest
ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ env.BRANCH_NAME }}:${{ env.COMMIT_ID }}
- name: Scan Image
uses: aquasecurity/trivy-action@master
Expand All @@ -120,4 +126,4 @@ jobs:
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/[email protected]
with:
sarif_file: 'trivy-image-results.sarif'
sarif_file: 'trivy-image-results.sarif'
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public final class AccessControlUtils {

public static final String ATTR_PURPOSE_CLASSIFICATIONS = "purposeClassifications";

public static final String ATTR_SERVICE_SERVICE_TYPE = "authServiceType";
public static final String ATTR_SERVICE_TAG_SERVICE = "tagService";
public static final String ATTR_SERVICE_IS_ENABLED = "authServiceIsEnabled";
public static final String ATTR_SERVICE_LAST_SYNC = "authServicePolicyLastSync";
public static final String ATTR_POLICY_TYPE = "policyType";
public static final String ATTR_POLICY_USERS = "policyUsers";
public static final String ATTR_POLICY_GROUPS = "policyGroups";
Expand Down

0 comments on commit 6485bcc

Please sign in to comment.