Skip to content

Conversation

@juliannguyen4
Copy link
Collaborator

No description provided.

Comment on lines +26 to +58
runs-on: ubuntu-24.04
steps:
- name: Log into Github's Docker registry to upload our custom server Docker image
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set new Docker image name and tag
uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.REGISTRY }}/aerospike/aerospike-server-enterprise
flavor: |
latest=false
type=raw,value=${{ inputs.new-image-tag }}

- name: Build Aerospike server EE Docker image for testing
uses: docker/build-push-action@v6
with:
# Don't want to use default Git context or else it will clone the whole Python client repo again
context: .github/workflows/docker-build-context
build-args: |
SERVER_IMAGE=${{ inputs.base-image-name }}:${{ inputs.base-image-tag }}
TLS_PORT=${{ env.TLS_PORT }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# setup-buildx-action configures Docker to use the docker-container build driver
# This driver doesn't publish an image locally by default
# so we have to manually enable it
load: true
push: true

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 14 days ago

To fix the problem, an explicit permissions block should be added at either the workflow or job level to limit the GITHUB_TOKEN's permissions to only what is strictly needed. For this workflow, pushing Docker images to the GitHub Container Registry and accessing repository content are required. Thus, setting permissions to contents: read and packages: write suffices. The recommended best practice is to set permissions at the top level of the workflow unless specific jobs require broader or different permissions.

Change required:
Add the following at the root of .github/workflows/build-server-ee-image-for-dev-tests.yml, directly after the on: or env: keys (typically after on: and before env:):

permissions:
  contents: read
  packages: write

No additional imports, method definitions, or variable definitions are required.


Suggested changeset 1
.github/workflows/build-server-ee-image-for-dev-tests.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/build-server-ee-image-for-dev-tests.yml b/.github/workflows/build-server-ee-image-for-dev-tests.yml
--- a/.github/workflows/build-server-ee-image-for-dev-tests.yml
+++ b/.github/workflows/build-server-ee-image-for-dev-tests.yml
@@ -17,6 +17,10 @@
         required: true
         default: 'latest'
 
+permissions:
+  contents: read
+  packages: write
+
 env:
   TLS_PORT: 4333
   REGISTRY: ghcr.io
EOF
@@ -17,6 +17,10 @@
required: true
default: 'latest'

permissions:
contents: read
packages: write

env:
TLS_PORT: 4333
REGISTRY: ghcr.io
Copilot is powered by AI and may make mistakes. Always verify output.
@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (34c2e3f) to head (7d63a8a).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #849       +/-   ##
==========================================
- Coverage   82.35%   0.00%   -82.36%     
==========================================
  Files          99      80       -19     
  Lines       14379   12541     -1838     
==========================================
- Hits        11842       0    -11842     
- Misses       2537   12541    +10004     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@juliannguyen4 juliannguyen4 changed the title [CLIENT-3813] CI/CD: Add workflow to build server docker image for dev tests [CLIENT-3813] CI/CD: Check if custom server image was built for the base image already. Also add workflow to build server docker image for dev tests Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants