diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index d4346667cf..713cba1647 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -34,12 +34,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: @@ -49,9 +49,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/maven-settings-action@v2.8.0 @@ -65,6 +64,7 @@ jobs: - name: Build with Maven run: | + branch_name=${{ steps.get_branch.outputs.branch }} if [[ $branch_name == 'main' || $branch_name == 'master' || $branch_name == 'taskdg1924' ]] then @@ -75,19 +75,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 @@ -104,8 +111,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 @@ -118,4 +125,4 @@ jobs: - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v2.1.33 with: - sarif_file: 'trivy-image-results.sarif' + sarif_file: 'trivy-image-results.sarif' \ No newline at end of file diff --git a/repository/src/main/java/org/apache/atlas/repository/util/AccessControlUtils.java b/repository/src/main/java/org/apache/atlas/repository/util/AccessControlUtils.java index 3040a19401..9ec45e7db7 100644 --- a/repository/src/main/java/org/apache/atlas/repository/util/AccessControlUtils.java +++ b/repository/src/main/java/org/apache/atlas/repository/util/AccessControlUtils.java @@ -65,7 +65,6 @@ public final class AccessControlUtils { public static final String ATTR_SERVICE_LAST_SYNC = "authServicePolicyLastSync"; public static final String ATTR_PURPOSE_CLASSIFICATIONS = "purposeClassifications"; - public static final String ATTR_POLICY_TYPE = "policyType"; public static final String ATTR_POLICY_USERS = "policyUsers"; public static final String ATTR_POLICY_GROUPS = "policyGroups"; diff --git a/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java b/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java index 0a9bb7cfda..e0b473d766 100644 --- a/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java +++ b/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java @@ -17,8 +17,8 @@ */ package org.apache.atlas.tasks; -import com.datastax.oss.driver.shaded.fasterxml.jackson.core.JsonProcessingException; -import com.datastax.oss.driver.shaded.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.atlas.AtlasConfiguration; import org.apache.atlas.RequestContext; import org.apache.atlas.annotation.GraphTransaction;