-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Release V2.1.0 #228
Closed
feat: Release V2.1.0 #228
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
82ef268
chore(deps-dev): bump typescript from 5.4.5 to 5.6.2
dependabot[bot] b45e82d
feat: validate variables
3322b8d
test: update lib
68bc617
test: mock libs
9d91305
test: mock libs
bd1677a
fix: reuse dbconfig type
9ec609a
fix: update test import paths
4978e11
build: update lib
bd72756
Merge pull request #221 from tazama-lf/env/validation
rtkay123 e080e21
Merge pull request #217 from tazama-lf/dependabot/npm_and_yarn/typesc…
Justus-at-Tazama f343d3a
refactor: apply cache option environment variable split
cshezi 91b2cbc
Merge pull request #226 from tazama-lf/split-cache-options
cshezi bd51eda
refactor: encapsulated the environment variables
cshezi 59ef9c5
test: refactored units to accommodate encapsulation of environment va…
cshezi b372a44
refactor: update package lock file
cshezi 0ba2da5
refactor: fix typo
cshezi b90716f
refactor: bump tazama libraries
cshezi 39da7c9
refactor: remove unused mocks
cshezi b33633a
refactor: bump lib version
cshezi c530cff
Merge pull request #230 from tazama-lf/encapsulation
cshezi 7574ac1
feat: updated Version of libraries to support multi-currency
JeanPierreNell 276e058
test(env): singular jest instance
JeanPierreNell bd23b59
Merge pull request #234 from tazama-lf/multi-curreny
JeanPierreNell 80a27d9
build: update libs (#241)
rtkay123 d2a0095
ci: sync workflows from central-workflows (#242)
scott45 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# This GitHub Actions workflow checks that all commits in a pull request (PR) have a "Signed-off-by" line to ensure Developer Certificate of Origin (DCO) compliance. | ||
|
||
# Please do not attempt to edit this flow without the direct consent from the DevOps team. This file is managed centrally. | ||
|
||
name: DCO | ||
|
||
# Trigger the workflow on pull request events | ||
on: [pull_request] | ||
|
||
jobs: | ||
dco: | ||
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' | ||
# Define the runner environment | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step to check out the repository | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches to ensure complete commit history is available | ||
|
||
- name: Set up environment variables | ||
run: | | ||
echo "BASE_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV | ||
echo "HEAD_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV | ||
|
||
# Step to check each commit in the pull request for a Signed-off-by line | ||
- name: Check for DCO Sign-off | ||
run: | | ||
# Get the base branch and head branch of the pull request | ||
base_branch=$BASE_BRANCH | ||
head_branch=$HEAD_BRANCH | ||
|
||
# Get the list of commit hashes between the head branch and base branch | ||
commits=$(git log --pretty=format:%H origin/${head_branch}..origin/${base_branch}) | ||
non_compliant_commits="" | ||
|
||
# Loop through each commit and check for the Signed-off-by line | ||
for commit in $commits; do | ||
# Check if the commit message contains the Signed-off-by line | ||
if ! git show --quiet --format=%B $commit | grep -q "^Signed-off-by: "; then | ||
# If not, add the commit hash to the list of non-compliant commits | ||
non_compliant_commits="$non_compliant_commits $commit" | ||
fi | ||
done | ||
|
||
# If there are any non-compliant commits, output their hashes and fail the job | ||
if [ -n "$non_compliant_commits" ]; then | ||
echo "The following commits do not have a Signed-off-by line:" | ||
for commit in $non_compliant_commits; do | ||
echo "- $commit" | ||
done | ||
exit 1 | ||
fi | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# hadoint is a Dockerfile linter written in Haskell | ||
# that helps you build best practice Docker images. | ||
# More details at https://github.com/hadolint/hadolint | ||
|
||
# Please do not attempt to edit this flow without the direct consent from the DevOps team. This file is managed centrally. | ||
|
||
name: Hadolint | ||
|
||
on: | ||
push: | ||
branches: [ "dev", "main" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "dev" ] | ||
schedule: | ||
- cron: '17 13 * * 0' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
hadolint: | ||
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' | ||
name: Run hadolint scanning | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run hadolint | ||
uses: hadolint/hadolint-action@f988afea3da57ee48710a9795b6bb677cc901183 | ||
with: | ||
dockerfile: ./Dockerfile | ||
format: sarif | ||
output-file: hadolint-results.sarif | ||
no-fail: true | ||
|
||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: hadolint-results.sarif | ||
wait-for-processing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
|
||
# Please do not attempt to edit this flow without the direct consent from the DevOps team. This file is managed centrally. | ||
|
||
name: Publish Docker image | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
push_to_registry: | ||
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
attestations: write | ||
id-token: write | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Set ENV variables | ||
run: | | ||
echo "REPO_NAME=${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}" >> $GITHUB_ENV | ||
|
||
- name: Use the custom ENV variable | ||
run: | | ||
echo $REPO_NAME | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: tazamaorg/${{ env.REPO_NAME }} | ||
tags: | | ||
type=raw,value=2.1.0 | ||
|
||
- name: Build and push Docker image | ||
id: push | ||
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: GH_TOKEN=${{ secrets.GH_TOKEN }} | ||
|
||
- name: Generate artifact attestation | ||
uses: actions/attest-build-provenance@v1 | ||
with: | ||
subject-name: docker.io/tazamaorg/${{ env.REPO_NAME }} | ||
subject-digest: ${{ steps.push.outputs.digest }} | ||
push-to-registry: false | ||
|
||
- name: Send Slack Notification | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
run: | | ||
curl -X POST -H 'Content-type: application/json' --data '{"blocks": [{"type": "header","text": {"type": "plain_text","text": "New Dockerhub Image published :ship::ship:","emoji": true}},{"type": "section","fields": [{"type": "mrkdwn","text": "*Service:*\n${{ env.REPO_NAME }} "},{"type": "mrkdwn","text": "*Tazama Dockerhub:*\n<https://hub.docker.com/orgs/tazamaorg/repositories>"}]}]}' $SLACK_WEBHOOK_URL |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / Checkov (reported by Codacy)
Ensure run commands are not vulnerable to shell injection Note