-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pep plugin #10
Merged
Merged
Pep plugin #10
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
f18f534
add pep plugin
wistefan 060376e
fix small parts
wistefan c963c17
update workflows
wistefan eeba43f
correct paht
wistefan 703c734
cahnge paths
wistefan f55f4b1
tidy
wistefan ecd7f18
change it
wistefan 8f86d55
more ficxes
wistefan af22a20
build and use tar
wistefan 3e7e389
copy tar file
wistefan 606e84f
ls
wistefan 62509f6
change syntax
wistefan 7643d12
backj
wistefan bc7708e
enable buildkit
wistefan 9244675
kong image
wistefan 06653eb
dont load
wistefan e6dd37a
test compile and make public
wistefan 6d925c7
update pom
wistefan a45cd66
fix workflow
wistefan 0b8c645
whats going on?
wistefan 7ab7c15
add &
wistefan c22f077
again
wistefan 17c3996
stream logs
wistefan 5b6a88d
try to fix go build
wistefan 8def0dc
change build
wistefan 19a4a2f
cahnge build approach
wistefan 62f4f79
where are my tests?
wistefan 54498ba
correct packaging
wistefan 37db21d
change the build again
wistefan 4738a6a
add pre and release
wistefan 5cc7c77
test rm
wistefan 0eba7e1
add docs
wistefan 4ccb426
Cleanup the yaml
wistefan 561e1e0
add log
wistefan 78309b4
move
wistefan ff3e7e7
remove log again
wistefan feb52b0
use temp llib
wistefan cec7cf5
fix syntax
wistefan 3c729cb
install lua lib
wistefan e80801f
add unit tests
wistefan 1fb0e7f
update spec
wistefan 9f4b726
add kong keycloak plugin (#11)
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Integration tests | ||
|
||
on: | ||
push | ||
|
||
env: | ||
KONG_VERSION: 2.8.1 | ||
|
||
jobs: | ||
|
||
prepare-and-run: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: '17' | ||
java-package: jdk | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '>=1.17.0' | ||
|
||
- name: Build pep-plugin | ||
run: | | ||
cd ./kong-pep-plugin | ||
docker run -v $(pwd):/temp/ --workdir="/temp" kong/go-plugin-tool:2.0.4-alpine-latest go build -ldflags "-X pep-plugin.Version=${{ needs.generate-version.outputs.version }}" -o pep-plugin . | ||
cd .. | ||
mkdir ./go-plugins/ | ||
cp ./kong-pep-plugin/pep-plugin ./go-plugins/pep-plugin | ||
|
||
|
||
- name: Prepare values | ||
run: | | ||
echo GITHUB_ORGANISATION: fiware >> values.yaml | ||
echo GITHUB_REPO: kong-plugins-fiware >> values.yaml | ||
echo VERSION: 0.0.1 >> values.yaml | ||
|
||
|
||
- name: Parse rockspec | ||
run: | | ||
go install github.com/cbroglie/mustache/cmd/mustache@v1.3.1 | ||
~/go/bin/mustache values.yaml kong-plugin-auth-endpoint-config-ishare/rockspec.mustache > kong-plugin-auth-endpoint-config-ishare/kong-plugin-auth-endpoint-config-ishare-0.0.1-1.rockspec | ||
~/go/bin/mustache values.yaml kong-plugin-ngsi-ishare-policies/rockspec.mustache > kong-plugin-ngsi-ishare-policies/kong-plugin-ngsi-ishare-policies-0.0.1-1.rockspec | ||
|
||
- uses: leafo/gh-actions-lua@v9 | ||
- uses: leafo/gh-actions-luarocks@v4 | ||
|
||
- name: Make rock | ||
run: | | ||
cd kong-plugin-auth-endpoint-config-ishare | ||
luarocks make | ||
luarocks pack kong-plugin-auth-endpoint-config-ishare 0.0.1-1 | ||
cd .. | ||
cd kong-plugin-ngsi-ishare-policies | ||
luarocks make | ||
luarocks pack kong-plugin-ngsi-ishare-policies 0.0.1-1 | ||
cd .. | ||
mkdir plugin-dir | ||
cp -r kong-plugin-auth-endpoint-config-ishare/. plugin-dir/ | ||
cp -r kong-plugin-ngsi-ishare-policies/. plugin-dir/ | ||
cd plugin-dir/ | ||
luarocks install lua-fiware-lib | ||
luarocks pack lua-fiware-lib | ||
luarocks install lua-resty-jwt | ||
luarocks pack lua-resty-jwt | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Get dockerfiles | ||
run: | | ||
wget https://raw.githubusercontent.com/Kong/docker-kong/master/customize/Dockerfile | ||
wget https://raw.githubusercontent.com/Kong/docker-kong/master/customize/empty_file | ||
wget https://raw.githubusercontent.com/Kong/docker-kong/master/customize/packer.lua | ||
|
||
- name: Add plugins | ||
run: | | ||
echo "USER root" >> Dockerfile | ||
echo "COPY ./go-plugins /kong/go-plugins" >> Dockerfile | ||
echo "RUN chmod -R 777 /kong/go-plugins/" >> Dockerfile | ||
echo "USER kong" >> Dockerfile | ||
|
||
- name: Build image | ||
run: | | ||
docker build --build-arg KONG_BASE="kong:${{ env.KONG_VERSION }}-alpine" --build-arg PLUGINS="lua-fiware-lib,kong-plugin-auth-endpoint-config-ishare,kong-plugin-ngsi-ishare-policies" --build-arg ROCKS_DIR="./plugin-dir" . -t fiware/kong:0.0.1 | ||
|
||
- name: Execute test | ||
run: | | ||
cd it/ | ||
mvn integration-test |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this be extracted somehow of the dependencies in the rock manifests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is in the release build, but there is no published version during the IT tests, thus I have to create them in-line(same as with pre-release).