Skip to content
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

chore(deps): dependencies updates #350

Merged
merged 2 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@
version: 2
updates:
# Root package-*.json files
- package-ecosystem: 'npm'
directory: '/'
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: 'daily'
interval: "daily"
labels:
- 'chore'
- "chore"

# Root Dockerfile
- package-ecosystem: 'docker'
directory: '/'
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: 'daily'
interval: "daily"
labels:
- 'chore'
- "chore"

# Git Hub Actions
# Set the directory to `/` for
# .github/workflows GHA files
- package-ecosystem: 'github-actions'
directory: '/'
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: 'daily'
interval: "daily"
labels:
- 'chore'
- "chore"
62 changes: 29 additions & 33 deletions .github/workflows/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,47 +16,43 @@ read selection
if [ -n "$selection" ]; then

############### INFRASTRUCTURE ###############
if [ "$selection" = "0" ]
then
destination=infrastructure
branch=main
if [ "$selection" = "0" ]; then
destination=infrastructure
branch=main
############### DEPLOYMENT ###############
elif [ "$selection" = "1" ]
then
read destination
branch=main
elif [ "$selection" = "1" ]; then
read destination
branch=main
############### ACR PURGE ###############
elif [ "$selection" = "2" ]
then
destination=""
branch=""
az acr run --cmd "acr purge --filter 'mdm:.*' --ago 7d" --registry "${ACR}" /dev/null
elif [ "$selection" = "2" ]; then
destination=""
branch=""
az acr run --cmd "acr purge --filter 'mdm:.*' --ago 7d" --registry "${ACR}" /dev/null
############### ACR PURGE ###############
fi

if [ -n "$destination" -a -n "$branch" ]
then
# Display latest push commit
git checkout "${branch}"
git pull
printf "\n\n${NC}⬆️ ${branch} branch latest push : ${NC}"
printf "${GREEN}"
git log -n 1 --pretty | sort | grep commit
printf "${NC}\n\n"

# Deploy
git checkout -b "${destination}"
git push -f --set-upstream origin "${destination}"

# Clean up
git checkout "${branch}"
git branch -d "${destination}"
printf "\n\n✅ ${destination} deployment initiated, switched to ${branch}.\n\n"
if [ -n "$destination" -a -n "$branch" ]; then
# Display latest push commit
git checkout "${branch}"
git pull
printf "\n\n${NC}⬆️ ${branch} branch latest push : ${NC}"
printf "${GREEN}"
git log -n 1 --pretty | sort | grep commit
printf "${NC}\n\n"

# Deploy
git checkout -b "${destination}"
git push -f --set-upstream origin "${destination}"

# Clean up
git checkout "${branch}"
git branch -d "${destination}"
printf "\n\n✅ ${destination} deployment initiated, switched to ${branch}.\n\n"
fi

else
printf "${RED} ❌ Invalid input, terminating.${NC}\n\n";
exit 0;
printf "${RED} ❌ Invalid input, terminating.${NC}\n\n"
exit 0
fi

#######################################
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ on:
- production

paths:
- 'src/**'
- 'package.json'
- 'package-lock.json'
- 'Dockerfile'
- 'tsconfig.json'
- 'tsconfig.build.json'
- '.github/workflows/deployment.yml'
- "src/**"
- "package.json"
- "package-lock.json"
- "Dockerfile"
- "tsconfig.json"
- "tsconfig.build.json"
- ".github/workflows/deployment.yml"

env:
PRODUCT: apim
ENVIRONMENT: ${{ github.ref_name }}
TIMEZONE: 'Europe/London'
TIMEZONE: "Europe/London"
# Base artifact
FROM: latest

Expand Down Expand Up @@ -161,4 +161,3 @@ jobs:
--protocols https \
--specification-url https://$(az containerapp show --name ${{ env.CA_NAME }} --query properties.latestRevisionFqdn -o tsv)/openapi/json \
--subscription-required true

2 changes: 1 addition & 1 deletion .github/workflows/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ on:
env:
PRODUCT: apim
ENVIRONMENT: infrastructure
TIMEZONE: 'Europe/London'
TIMEZONE: "Europe/London"
# Deployment environment target i.e., `dev`, `staging`, `production`
TARGET: ${{ vars.ENVIRONMENT }}

Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,32 @@ run-name: Executing lint QA on ${{ github.repository }} 🚀

on:
pull_request:
branches: [ main ]
branches: [main]
paths:
- 'src/**'
- 'test/**'
- "src/**"
- "test/**"

env:
environment: 'qa'
timezone: 'Europe/London'
environment: "qa"
timezone: "Europe/London"
node: ${{ vars.NODE_VERSION }}

jobs:

# 1. Setup test infrastructure
# 1. Setup test infrastructure
setup:
name: Infrastructure setup 🔧
runs-on: ubuntu-latest
outputs:
environment: ${{ env.environment }}
timezone: ${{ env.timezone }}
steps:
- name: Environment 🧪
run: echo "Environment set to ${{ env.environment }}"
- name: Timezone 🌐
run: echo "Timezone set to ${{ env.timezone }}"
- name: Environment 🧪
run: echo "Environment set to ${{ env.environment }}"

- name: Timezone 🌐
run: echo "Timezone set to ${{ env.timezone }}"

# 2. Lint
# 2. Lint
lint:
name: Scanning 🎨
environment:
Expand All @@ -44,7 +43,7 @@ jobs:
uses: szenius/set-timezone@v1.2
with:
timezoneLinux: ${{ needs.setup.outputs.timezone }}

- name: Repository
uses: actions/checkout@v3

Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ run-name: Executing release on ${{ github.repository }} 🚀

on:
push:
branches: [ main ]
branches: [main]

jobs:

# 1. `package.json`, `README.md` and `CHANGELOG.md` updates
release:

name: Release setup 🔧
runs-on: ubuntu-latest
steps:
Expand All @@ -24,10 +22,10 @@ jobs:
release-type: node
package-name: uk-export-finance/mdm-api
changelog-types: '[
{ "type": "feat", "section": "Features", "hidden": false},
{ "type": "fix", "section": "Bug Fixes", "hidden": false},
{ "type": "chore", "section": "Miscellaneous", "hidden": false},
{ "type": "docs", "section": "Documentation", "hidden": false}
{ "type": "feat", "section": "Features", "hidden": false},
{ "type": "fix", "section": "Bug Fixes", "hidden": false},
{ "type": "chore", "section": "Miscellaneous", "hidden": false},
{ "type": "docs", "section": "Documentation", "hidden": false}
]'
extra-files: |
README.md
Expand Down
47 changes: 23 additions & 24 deletions .github/workflows/sca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,28 @@ run-name: Executing various SCAs on ${{ github.repository }} 🔍️

on:
pull_request:
branches: [ main ]
branches: [main]

env:
environment: 'qa'
timezone: 'Europe/London'
environment: "qa"
timezone: "Europe/London"

jobs:

# 1. Setup test infrastructure
# 1. Setup test infrastructure
setup:
name: Infrastructure setup 🔧
runs-on: ubuntu-latest
outputs:
environment: ${{ env.environment }}
timezone: ${{ env.timezone }}
steps:
- name: Environment 🧪
run: echo "Environment set to ${{ env.environment }}"
- name: Timezone 🌐
run: echo "Timezone set to ${{ env.timezone }}"
- name: Environment 🧪
run: echo "Environment set to ${{ env.environment }}"

- name: Timezone 🌐
run: echo "Timezone set to ${{ env.timezone }}"

# 2. Code quality - SCA
# 2. Code quality - SCA
codacy:
name: Codacy 🔖
needs: setup
Expand All @@ -42,15 +41,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Repository
uses: actions/checkout@v3
- name: Repository
uses: actions/checkout@v3

- name: Codacy
uses: codacy/codacy-analysis-cli-action@master
with:
verbose: true
- name: Codacy
uses: codacy/codacy-analysis-cli-action@master
with:
verbose: true

# 3. Licensing - SCA
# 3. Licensing - SCA
license:
name: Licensing ✏️
needs: setup
Expand All @@ -59,10 +58,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Repository
uses: actions/checkout@v3
- name: Repository
uses: actions/checkout@v3

- name: Fossa
uses: fossas/fossa-action@main
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
- name: Fossa
uses: fossas/fossa-action@main
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
23 changes: 11 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,31 @@ run-name: Executing test QA on ${{ github.repository }} 🚀

on:
pull_request:
branches: [ main ]
branches: [main]
paths:
- '**'
- "**"

env:
environment: 'qa'
timezone: 'Europe/London'
environment: "qa"
timezone: "Europe/London"
node: ${{ vars.NODE_VERSION }}

jobs:

# 1. Setup test infrastructure
# 1. Setup test infrastructure
setup:
name: Infrastructure setup 🔧
runs-on: ubuntu-latest
outputs:
environment: ${{ env.environment }}
timezone: ${{ env.timezone }}
steps:
- name: Environment 🧪
run: echo "Environment set to ${{ env.environment }}"
- name: Timezone 🌐
run: echo "Timezone set to ${{ env.timezone }}"
- name: Environment 🧪
run: echo "Environment set to ${{ env.environment }}"

- name: Timezone 🌐
run: echo "Timezone set to ${{ env.timezone }}"

# 2. Unit tests
# 2. Unit tests
unit-tests:
name: Unit 👷
needs: setup
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# UKEF
.env
.env*

# compiled output
/dist
Expand Down
Loading
Loading