Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
858ec46
feat: add postman.yml to github actions
CasLubbers Apr 24, 2025
4bb0828
feat: add workflow dispatch
CasLubbers Apr 24, 2025
5d2ae2d
feat: rename to postman
CasLubbers Apr 24, 2025
3d0f5e0
feat: rename to postman
CasLubbers Apr 24, 2025
1820742
feat: add path to checkout
CasLubbers Apr 24, 2025
ad5885d
feat: check apl-core start
CasLubbers Apr 24, 2025
bb42b98
feat: check api start
CasLubbers Apr 24, 2025
faca05d
feat: check api start
CasLubbers Apr 24, 2025
2b902b0
feat: move .env file
CasLubbers Apr 24, 2025
64332a3
feat: move .env file
CasLubbers Apr 24, 2025
05b03b5
feat: create git repo
CasLubbers Apr 24, 2025
fb45b62
feat: create git repo
CasLubbers Apr 24, 2025
ae363b3
feat: create git repo
CasLubbers Apr 24, 2025
91c9e94
feat: create git repo
CasLubbers Apr 24, 2025
edaf3f7
feat: create git repo
CasLubbers Apr 24, 2025
229428f
feat: create git repo
CasLubbers Apr 24, 2025
1552797
feat: create git repo
CasLubbers Apr 24, 2025
2e804ea
feat: create git repo
CasLubbers Apr 24, 2025
3cbe1db
feat: wait for API to be ready
CasLubbers Apr 24, 2025
e881cce
feat: add postman step
CasLubbers Apr 25, 2025
3f2d2a0
feat: add postman step
CasLubbers Apr 25, 2025
00786f1
feat: if always
CasLubbers Apr 25, 2025
840204b
feat: use log instead of upload
CasLubbers Apr 25, 2025
fc475d1
feat: upload logs
CasLubbers Apr 25, 2025
20e1065
feat: only run v2
CasLubbers Apr 25, 2025
316041a
feat: run api together with postman tests
CasLubbers Apr 25, 2025
1705339
feat: don't cleanup process
CasLubbers Apr 25, 2025
00dfdf3
feat: don't cleanup process
CasLubbers Apr 25, 2025
bc9dfd6
feat: don't cleanup process
CasLubbers Apr 25, 2025
bbeb060
feat: test background action
CasLubbers Apr 25, 2025
7e44bcb
feat: test background action
CasLubbers Apr 25, 2025
6cc044e
feat: test background action
CasLubbers Apr 25, 2025
62c270d
feat: test background action
CasLubbers Apr 25, 2025
2ed9755
feat: test background action
CasLubbers Apr 25, 2025
03b6645
feat: test start api
CasLubbers Apr 25, 2025
b8da74a
feat: test start api
CasLubbers Apr 25, 2025
507680f
feat: test postman run
CasLubbers Apr 28, 2025
ec115cc
Merge remote-tracking branch 'origin/main' into APL-702
CasLubbers Apr 28, 2025
147f9c7
feat: add comment
CasLubbers Apr 28, 2025
3b2afcd
feat: change workflow on
CasLubbers Apr 28, 2025
72209c5
Merge branch 'main' into APL-702
ElderMatt May 6, 2025
2e9e0db
fix: remove DS_store
CasLubbers May 7, 2025
236f154
Merge branch 'main' into APL-702
CasLubbers May 7, 2025
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
82 changes: 82 additions & 0 deletions .github/workflows/postman.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: 'postman'
on:
pull_request:
branches:
- '*'
workflow_dispatch:
jobs:
postman:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set npm token
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "@linode:registry=https://npm.pkg.github.com/linode" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
echo '::set-output name=diff::1'
- name: Install Node
run: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install
nvm use
node -v
npm install
- uses: actions/checkout@v4
with:
repository: linode/apl-core
path: apl-core
- name: Create Git repo
run: |
readonly env_dir="$HOME/workspace/linode/values-ofld1"
readonly apl_core_test_fixtures="$HOME/work/apl-api/apl-api/apl-core/tests/fixtures"
mkdir -p "$(dirname $env_dir)"
cp -R $apl_core_test_fixtures $env_dir
cd $env_dir
git init
git checkout -b main
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -a -m 'init'
# Mark this repo as bare so the local_env_dir can push to env_dir repo
git config --bool core.bare true
echo "The values bare repo has been successfully set up"
ls
- name: Start core server
run: |
cd apl-core
npm install
npm run server > $GITHUB_WORKSPACE/core.log 2>&1 &
- name: Start api
run: |
npm install
cp .env.sample .env
npm run dev > $GITHUB_WORKSPACE/api.log 2>&1 &
- name: Wait for api
run: |
echo "Waiting for API to be ready..."
while ! curl -s -f -o /dev/null http://localhost:8080/v2/builds; do
sleep 10
done
echo "API is ready!"
- name: Install Postman CLI
run: |
curl -o- "https://dl-cli.pstmn.io/install/linux64.sh" | sh
- name: Login to Postman CLI
run: postman login --with-api-key ${{ secrets.POSTMAN_API_KEY }}

- name: Run API tests
#The UUID's are the order the requests are executed in. So that the POST are executed first
run: |
postman collection run 44183872-1d1f2dba-6c47-4764-a847-a6bca216ecea -e 43715313-d380e919-5142-44e6-b52c-02f8b04da8fa -i 44183872-be57d2e3-650d-4494-ba65-6486b68082b0 -i 44183872-f50a0c10-89ef-4352-8a56-3093811b3311 -i 44183872-0a01d698-5d93-4ebf-bd52-6cd7b1af9735 -i 44183872-6229c491-250d-49a4-8388-7a2353129925 -i 44183872-07ac4c2a-037a-4002-a5d1-2e990cfcb1b0 -i 44183872-297df31a-4560-4f27-aa06-31437d59dd7c -i 44183872-47db1e8a-9245-49a6-a6ff-7044b95d8ad3 -i 44183872-beeb6115-2e7b-4a7b-bcd8-eb605a5cd3fc -i 44183872-eff09537-0ab0-4914-a15d-a08270360574 -i 44183872-5003d09d-439f-456a-8864-e6e1f62db807 -i 44183872-a25b9ea2-1c64-4bf1-a5e4-dc905f1a9a6a -i 44183872-7082300f-e721-43f3-9828-1f3bbd25ab0a -i 44183872-6631ed83-0ff4-4515-8fa6-2d57c2959e77 -i 44183872-0a483150-4d00-49f1-8f9a-31ab467f79ec -i 44183872-15ce6497-700f-49f9-949a-ec22bf169c3f -i 44183872-c4097a49-9f17-4d6e-8ff2-a1a1fcec2dff -i 44183872-e357451a-9526-4b57-bb5b-1190e0d6788f -i 44183872-9abfae13-8983-453e-85c5-a3951dddd8e6 -i 44183872-3db33396-563e-4f0a-b074-fc74680c72bd -i 44183872-61b903cb-d623-4b6d-85a3-ab2f7b0575d8 -i 44183872-34fb39a5-5bc2-4528-886a-49e4caf2d9b5 -i 44183872-e34ef3b6-f979-4407-8e69-b972be4d5184 -i 44183872-da7d9d0c-3ab1-457a-a56f-2fa49b151f1d -i 44183872-d7d08dac-364f-4f94-9c48-64dbd77fcadd -i 44183872-a6fad9da-3fae-4c7c-9e15-ec6d67a79b78 -i 44183872-79ff962a-4117-4b91-8cb6-2653b6d5a687 -i 44183872-225a21ca-9106-484c-83b5-1257bc6433e7 -i 44183872-7ac118a2-7f55-4996-a2e6-0b34eb7058ae -i 44183872-4d49d6c6-6367-4ec4-8b4c-6c6154118a3a -i 44183872-dd1b76be-26ee-4b5b-913b-8ce465778229 -i 44183872-ee200410-27ac-4c28-a469-21f487dfbaec -i 44183872-c7676daa-2257-47d6-88ca-178d433a5f28 -i 44183872-f162b5b5-1428-4f9e-8ea5-6bb3b7980b48 -i 44183872-048cddb0-5671-4abb-ac9f-8985c8e4ed6d -i 44183872-a9b4f64a-60be-43e5-bb55-6e16c85c9215 -i 44183872-a26a7e26-0df8-4ad9-95ce-ce168010f631 -i 44183872-9feaad53-dac9-475d-bd71-192d0c844e59 -i 44183872-d09732cd-0395-4b25-85c9-01b9c6a7d43c -i 44183872-1c7dca5b-58aa-4bb6-9224-d703e88b17cd -i 44183872-d183edcc-b144-4e80-9e10-72bf49f535d0 -i 44183872-7451bc15-e0cc-44a8-946b-f09bf024c9eb -i 44183872-3d6e845b-8a82-43b4-a6be-e30effc16d46 -i 44183872-d81fa269-56a3-4eef-934e-39a30e9e5dfd -i 44183872-0ed3bf3e-d78b-4818-bb47-ded64e22525f -i 44183872-fe220b54-58ce-427f-bd19-2f2716cfaa65
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: server-logs
path: |
core.log
api.log
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ secrets.*.yaml.dec
.idea/

.DS_Store

src/.DS_Store
4 changes: 1 addition & 3 deletions src/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2602,7 +2602,6 @@ components:
type: object
properties:
name:
example: name
$ref: 'definitions.yaml#/idName'
required:
- name
Expand All @@ -2615,12 +2614,11 @@ components:
type: object
properties:
name:
type: string
$ref: 'definitions.yaml#/idName'
labels:
type: object
properties:
apl.io/teamId:
example: team-name
$ref: 'definitions.yaml#/idName'
required:
- apl.io/teamId
Expand Down
2 changes: 2 additions & 0 deletions src/openapi/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ buildMode:
name:
title: Name
type: string
example: MY_ENV_VAR
value:
title: Value
type: string
example: my-value
required:
- name
- value
Expand Down
1 change: 1 addition & 0 deletions src/openapi/codeRepo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ AplCodeRepoSpec:
default: false
secret:
type: string
example: my-secret
required:
- gitService
- repositoryUrl
6 changes: 6 additions & 0 deletions src/openapi/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ alerts:
annotation:
type: string
pattern: ^((.){1,253}\/)?(.){1,63}$
example: apl.io/annotation
annotations:
description: Kubernetes annotations with arbitrary metadata
type: array
Expand All @@ -119,6 +120,7 @@ annotations:
value:
type: string
maxLength: 32767
example: apl-value
autoscaling:
type: object
properties:
Expand Down Expand Up @@ -625,6 +627,7 @@ idName:
pattern: ^[a-z]([-a-z0-9]*[a-z0-9])+$
type: string
x-message: a valid name that consists of lowercase letters, dashes
example: team-name
image:
allOf:
- properties:
Expand Down Expand Up @@ -654,6 +657,7 @@ imageTag:
pattern: '[\w][\w.-]{0,127}'
type: string
x-message: a valid container registry image tag
example: latest
imageSimple:
properties:
tag:
Expand Down Expand Up @@ -951,6 +955,7 @@ repoUrl:
pattern: ^(.+@)*([\w\d\.]+)(:[\d]+){0,1}/*(.*)$
type: string
x-message: a valid git repo URL
example: github.com/example/repo
resource:
properties:
cpu:
Expand Down Expand Up @@ -1106,6 +1111,7 @@ svcPredeployed:
url:
pattern: ^https?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)
type: string
example: https://gituhb.com/example
vaultToken:
title: Token
type: string
Expand Down
4 changes: 4 additions & 0 deletions src/openapi/netpol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ ruleType:
type: string
title: Selector label name
description: 'The name of the Pod selector label.'
example: app
toLabelValue:
type: string
title: Selector label value
description: 'The value of the Pod selector label.'
example: my-app
mode:
type: string
default: AllowAll
Expand All @@ -80,10 +82,12 @@ ruleType:
type: string
title: Selector label name
description: 'The name of the Pod selector label.'
example: app
fromLabelValue:
type: string
title: Selector label value
description: 'The value of the Pod selector label.'
example: my-app
required:
- fromNamespace
required:
Expand Down
2 changes: 2 additions & 0 deletions src/openapi/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,11 @@ AplServiceSpec:
name:
title: Name
type: string
example: my-header
value:
title: Value
type: string
example: my-value
required:
- name
- value
Loading