-
Notifications
You must be signed in to change notification settings - Fork 13
New namespace #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
New namespace #361
Changes from all commits
b2287cb
0f1c1c0
7f698d2
4d2a9e8
c4eda88
f7b73fd
e8830fc
3a8e740
3c52f8b
e3fe63e
5792842
9dd5cfc
2f2bb43
0c7277a
874360d
36e908e
82f07f3
11b5fe1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: clamav-client-build-and-push-dev | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- "Java/README.md" | ||
- "Java/clamav_client/**" | ||
- .github/workflows/build-push-clamav-client.yaml | ||
workflow_dispatch: | ||
|
||
env: | ||
IMAGE_NAME: clamav | ||
WORKING_DIRECTORY: Java/clamav_client | ||
REPO_KEY: af03 | ||
BRANCH_NAME: develop | ||
VALUES_FILE: dev | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Login to Artifactory | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: artifacts.developer.gov.bc.ca | ||
username: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
password: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
|
||
# Get SHORT_SHA for the version | ||
- name: Get short SHA | ||
id: short_sha | ||
run: | | ||
echo "::set-output name=SHORT_SHA::$(git rev-parse --short HEAD)" | ||
echo "Short SHA: $SHORT_SHA" | ||
|
||
- name: Build Image | ||
working-directory: ${{env.WORKING_DIRECTORY}} | ||
run: | | ||
docker build -t artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}-client:dev . | ||
|
||
- name: Docker Push to Artifactory | ||
run: | | ||
docker push artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}-client:dev | ||
|
||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: image | ||
image-ref: artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}-client:dev | ||
format: 'table' | ||
ignore-unfixed: true | ||
limit-severities-for-sarif: true | ||
severity: HIGH,CRITICAL | ||
|
||
- name: Set GitOps SSH Key | ||
uses: webfactory/ssh-agent@v0.5.4 | ||
with: | ||
ssh-private-key: ${{ secrets.RSBC_SSH_KEY }} | ||
|
||
- name: Update Helm Dev Values and Commit | ||
id: helm | ||
run: | | ||
|
||
echo "Updating ${{ env.BRANCH_NAME }} helm values to trigger ArgoCD deployment " | ||
|
||
# Commit and push the changes | ||
git config --global user.email "actions@github.com" | ||
git config --global user.name "RSBC-APR GitHub Actions" | ||
git clone -b ${{ env.BRANCH_NAME }} --single-branch git@github.com:bcgov-c/tenant-gitops-f0392a.git | ||
|
||
# Navigate to the directory containing your Helm values file for the environment develop -> DEV, test -> test | ||
|
||
cd tenant-gitops-f0392a/charts | ||
|
||
# Update the Helm values file with the new image tag and version | ||
DATETIME=$(date +'%Y-%m-%d %H:%M:%S') # Get current date and time | ||
echo "Updating tag ccversion: to ${{ steps.short_sha.outputs.SHORT_SHA }}" | ||
|
||
sed -i "s/ccversion: .*/ccversion: v-${{ steps.short_sha.outputs.SHORT_SHA }} # Image Updated on $DATETIME/" ../deploy/${{ env.VALUES_FILE }}_values.yaml | ||
|
||
git add . | ||
|
||
git add ../deploy/${{ env.VALUES_FILE }}_values.yaml | ||
|
||
# Repackage Helm Chart | ||
|
||
cd gitops | ||
|
||
helm dependency build | ||
|
||
git add . | ||
|
||
git commit -m "Update ${{ env.BRANCH_NAME }} clamavclient image tag" | ||
|
||
# pull any changes | ||
git pull origin ${{ env.BRANCH_NAME }} | ||
git push origin ${{ env.BRANCH_NAME }} # Update the branch name as needed | ||
Original file line number | Diff line number | Diff line change | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,103 @@ | |||||||||||||||||||||||
name: form-handler-build-and-push-dev | |||||||||||||||||||||||
|
|||||||||||||||||||||||
on: | |||||||||||||||||||||||
push: | |||||||||||||||||||||||
branches: [master] | |||||||||||||||||||||||
paths: | |||||||||||||||||||||||
- python/*.py | |||||||||||||||||||||||
- python/common/** | |||||||||||||||||||||||
- python/form_handler/** | |||||||||||||||||||||||
- .github/workflows/build-push-form-handler.yaml | |||||||||||||||||||||||
- trigger.txt | |||||||||||||||||||||||
workflow_dispatch: | |||||||||||||||||||||||
|
|||||||||||||||||||||||
env: | |||||||||||||||||||||||
IMAGE_NAME: form-handler | |||||||||||||||||||||||
WORKING_DIRECTORY: ./python | |||||||||||||||||||||||
REPO_KEY: af03 | |||||||||||||||||||||||
BRANCH_NAME: develop | |||||||||||||||||||||||
VALUES_FILE: dev | |||||||||||||||||||||||
|
|||||||||||||||||||||||
jobs: | |||||||||||||||||||||||
build: | |||||||||||||||||||||||
runs-on: ubuntu-latest | |||||||||||||||||||||||
|
|||||||||||||||||||||||
steps: | |||||||||||||||||||||||
- uses: actions/checkout@v3 | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Login to Artifactory | |||||||||||||||||||||||
uses: docker/login-action@v1 | |||||||||||||||||||||||
with: | |||||||||||||||||||||||
registry: artifacts.developer.gov.bc.ca | |||||||||||||||||||||||
username: ${{ secrets.ARTIFACTORY_USERNAME }} | |||||||||||||||||||||||
password: ${{ secrets.ARTIFACTORY_PASSWORD }} | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# Get SHORT_SHA for the version | |||||||||||||||||||||||
- name: Get short SHA | |||||||||||||||||||||||
id: short_sha | |||||||||||||||||||||||
run: | | |||||||||||||||||||||||
echo "::set-output name=SHORT_SHA::$(git rev-parse --short HEAD)" | |||||||||||||||||||||||
echo "Short SHA: $SHORT_SHA" | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Build Image | |||||||||||||||||||||||
working-directory: ${{env.WORKING_DIRECTORY}} | |||||||||||||||||||||||
run: | | |||||||||||||||||||||||
docker build -t artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}:dev -f form_handler/Dockerfile . | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Docker Push to Artifactory | |||||||||||||||||||||||
run: | | |||||||||||||||||||||||
docker push artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}:dev | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Run Trivy vulnerability scanner | |||||||||||||||||||||||
uses: aquasecurity/trivy-action@master | |||||||||||||||||||||||
with: | |||||||||||||||||||||||
scan-type: image | |||||||||||||||||||||||
image-ref: artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}:dev | |||||||||||||||||||||||
format: 'table' | |||||||||||||||||||||||
ignore-unfixed: true | |||||||||||||||||||||||
limit-severities-for-sarif: true | |||||||||||||||||||||||
severity: HIGH,CRITICAL | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Set GitOps SSH Key | |||||||||||||||||||||||
uses: webfactory/ssh-agent@v0.5.4 | |||||||||||||||||||||||
with: | |||||||||||||||||||||||
ssh-private-key: ${{ secrets.RSBC_SSH_KEY }} | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Update Helm Dev Values and Commit | |||||||||||||||||||||||
id: helm | |||||||||||||||||||||||
run: | | |||||||||||||||||||||||
|
|||||||||||||||||||||||
echo "Updating ${{ env.BRANCH_NAME }} helm values to trigger ArgoCD deployment " | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# Commit and push the changes | |||||||||||||||||||||||
git config --global user.email "actions@github.com" | |||||||||||||||||||||||
git config --global user.name "RSBC-APR GitHub Actions" | |||||||||||||||||||||||
git clone -b ${{ env.BRANCH_NAME }} --single-branch git@github.com:bcgov-c/tenant-gitops-f0392a.git | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# Navigate to the directory containing your Helm values file for the environment develop -> DEV, test -> test | |||||||||||||||||||||||
|
|||||||||||||||||||||||
cd tenant-gitops-f0392a/charts | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# Update the Helm values file with the new image tag and version | |||||||||||||||||||||||
DATETIME=$(date +'%Y-%m-%d %H:%M:%S') # Get current date and time | |||||||||||||||||||||||
echo "Updating tag fhversion: to ${{ steps.short_sha.outputs.SHORT_SHA }}" | |||||||||||||||||||||||
|
|||||||||||||||||||||||
sed -i "s/fhversion: .*/fhversion: v-${{ steps.short_sha.outputs.SHORT_SHA }} # Image Updated on $DATETIME/" ../deploy/${{ env.VALUES_FILE }}_values.yaml | |||||||||||||||||||||||
|
|||||||||||||||||||||||
git add . | |||||||||||||||||||||||
|
|||||||||||||||||||||||
git add ../deploy/${{ env.VALUES_FILE }}_values.yaml | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# Repackage Helm Chart | |||||||||||||||||||||||
|
|||||||||||||||||||||||
cd gitops | |||||||||||||||||||||||
|
|||||||||||||||||||||||
helm dependency build | |||||||||||||||||||||||
|
|||||||||||||||||||||||
git add . | |||||||||||||||||||||||
|
|||||||||||||||||||||||
git commit -m "Update ${{ env.BRANCH_NAME }} formhandler image tag" | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# pull any changes | |||||||||||||||||||||||
git pull origin ${{ env.BRANCH_NAME }} | |||||||||||||||||||||||
git push origin ${{ env.BRANCH_NAME }} # Update the branch name as needed | |||||||||||||||||||||||
Comment on lines
+23
to
+103
Check warningCode 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: {contents: read}
Copilot AutofixAI 18 days ago To fix the issue, we need to add a
The
Suggested changeset
1
.github/workflows/build-push-form-handler.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Positive FeedbackNegative Feedback
Refresh and try again.
|
Original file line number | Diff line number | Diff line change | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,103 @@ | |||||||||||||||||||||||
name: ingestor-build-and-push-dev | |||||||||||||||||||||||
|
|||||||||||||||||||||||
on: | |||||||||||||||||||||||
push: | |||||||||||||||||||||||
branches: [master] | |||||||||||||||||||||||
paths: | |||||||||||||||||||||||
- python/*.py | |||||||||||||||||||||||
- python/common/** | |||||||||||||||||||||||
- python/form_handler/** | |||||||||||||||||||||||
- .github/workflows/build-push-ingestor.yaml | |||||||||||||||||||||||
- trigger.txt | |||||||||||||||||||||||
workflow_dispatch: | |||||||||||||||||||||||
|
|||||||||||||||||||||||
env: | |||||||||||||||||||||||
IMAGE_NAME: ingestor | |||||||||||||||||||||||
WORKING_DIRECTORY: ./python | |||||||||||||||||||||||
REPO_KEY: af03 | |||||||||||||||||||||||
BRANCH_NAME: develop | |||||||||||||||||||||||
VALUES_FILE: dev | |||||||||||||||||||||||
|
|||||||||||||||||||||||
jobs: | |||||||||||||||||||||||
build: | |||||||||||||||||||||||
runs-on: ubuntu-latest | |||||||||||||||||||||||
|
|||||||||||||||||||||||
steps: | |||||||||||||||||||||||
- uses: actions/checkout@v3 | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Login to Artifactory | |||||||||||||||||||||||
uses: docker/login-action@v1 | |||||||||||||||||||||||
with: | |||||||||||||||||||||||
registry: artifacts.developer.gov.bc.ca | |||||||||||||||||||||||
username: ${{ secrets.ARTIFACTORY_USERNAME }} | |||||||||||||||||||||||
password: ${{ secrets.ARTIFACTORY_PASSWORD }} | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# Get SHORT_SHA for the version | |||||||||||||||||||||||
- name: Get short SHA | |||||||||||||||||||||||
id: short_sha | |||||||||||||||||||||||
run: | | |||||||||||||||||||||||
echo "::set-output name=SHORT_SHA::$(git rev-parse --short HEAD)" | |||||||||||||||||||||||
echo "Short SHA: $SHORT_SHA" | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Build Image | |||||||||||||||||||||||
working-directory: ${{env.WORKING_DIRECTORY}} | |||||||||||||||||||||||
run: | | |||||||||||||||||||||||
docker build -t artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}:dev -f ingestor/Dockerfile . | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Docker Push to Artifactory | |||||||||||||||||||||||
run: | | |||||||||||||||||||||||
docker push artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}:dev | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Run Trivy vulnerability scanner | |||||||||||||||||||||||
uses: aquasecurity/trivy-action@master | |||||||||||||||||||||||
with: | |||||||||||||||||||||||
scan-type: image | |||||||||||||||||||||||
image-ref: artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}:dev | |||||||||||||||||||||||
format: 'table' | |||||||||||||||||||||||
ignore-unfixed: true | |||||||||||||||||||||||
limit-severities-for-sarif: true | |||||||||||||||||||||||
severity: HIGH,CRITICAL | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Set GitOps SSH Key | |||||||||||||||||||||||
uses: webfactory/ssh-agent@v0.5.4 | |||||||||||||||||||||||
with: | |||||||||||||||||||||||
ssh-private-key: ${{ secrets.RSBC_SSH_KEY }} | |||||||||||||||||||||||
|
|||||||||||||||||||||||
- name: Update Helm Dev Values and Commit | |||||||||||||||||||||||
id: helm | |||||||||||||||||||||||
run: | | |||||||||||||||||||||||
|
|||||||||||||||||||||||
echo "Updating ${{ env.BRANCH_NAME }} helm values to trigger ArgoCD deployment " | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# Commit and push the changes | |||||||||||||||||||||||
git config --global user.email "actions@github.com" | |||||||||||||||||||||||
git config --global user.name "RSBC-APR GitHub Actions" | |||||||||||||||||||||||
git clone -b ${{ env.BRANCH_NAME }} --single-branch git@github.com:bcgov-c/tenant-gitops-f0392a.git | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# Navigate to the directory containing your Helm values file for the environment develop -> DEV, test -> test | |||||||||||||||||||||||
|
|||||||||||||||||||||||
cd tenant-gitops-f0392a/charts | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# Update the Helm values file with the new image tag and version | |||||||||||||||||||||||
DATETIME=$(date +'%Y-%m-%d %H:%M:%S') # Get current date and time | |||||||||||||||||||||||
echo "Updating tag iversion: to ${{ steps.short_sha.outputs.SHORT_SHA }}" | |||||||||||||||||||||||
|
|||||||||||||||||||||||
sed -i "s/iversion: .*/iversion: v-${{ steps.short_sha.outputs.SHORT_SHA }} # Image Updated on $DATETIME/" ../deploy/${{ env.VALUES_FILE }}_values.yaml | |||||||||||||||||||||||
|
|||||||||||||||||||||||
git add . | |||||||||||||||||||||||
|
|||||||||||||||||||||||
git add ../deploy/${{ env.VALUES_FILE }}_values.yaml | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# Repackage Helm Chart | |||||||||||||||||||||||
|
|||||||||||||||||||||||
cd gitops | |||||||||||||||||||||||
|
|||||||||||||||||||||||
helm dependency build | |||||||||||||||||||||||
|
|||||||||||||||||||||||
git add . | |||||||||||||||||||||||
|
|||||||||||||||||||||||
git commit -m "Update ${{ env.BRANCH_NAME }} ingestor image tag" | |||||||||||||||||||||||
|
|||||||||||||||||||||||
# pull any changes | |||||||||||||||||||||||
git pull origin ${{ env.BRANCH_NAME }} | |||||||||||||||||||||||
git push origin ${{ env.BRANCH_NAME }} # Update the branch name as needed | |||||||||||||||||||||||
Comment on lines
+23
to
+103
Check warningCode 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: {contents: read}
Copilot AutofixAI 18 days ago To fix the issue, we need to add a
The
Suggested changeset
1
.github/workflows/build-push-ingestor.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Positive FeedbackNegative Feedback
Refresh and try again.
|
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 18 days ago
To fix the issue, we will add a
permissions
block at the root of the workflow. This block will define the minimal permissions required for the workflow to function correctly. Based on the actions used in the workflow, the following permissions are needed:contents: write
for committing and pushing changes to the repository.packages: write
for pushing Docker images to the Artifactory registry.The
permissions
block will be added after thename
field in the workflow file.