Skip to content

Commit

Permalink
Merge branch 'interTwin-eu:main' into otel_interlink
Browse files Browse the repository at this point in the history
  • Loading branch information
Surax98 authored Aug 27, 2024
2 parents ac9a4b4 + a2521d5 commit be83bfb
Show file tree
Hide file tree
Showing 33 changed files with 741 additions and 928 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build_docusaurus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Update Docusaurus

on:
push:
branches:
- main
tags-ignore:
- "*"
workflow_call:

jobs:
update-doc:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Remove existing openapi.json
run: rm ./docs/openapi/openapi.json

- name: Download openapi.json
uses: robinraju/release-downloader@v1
with:
latest: true
preRelease: false
fileName: 'openAPISpec'
out-file-path: 'docs/openapi'

- name: Rename openAPISpec to openapi.json
run: mv ./docs/openapi/openAPISpec ./docs/openapi/openapi.json

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22' # Ensure this matches the Node.js version required by Docusaurus

- name: Install dependencies
working-directory: ./docs # Change to the directory where package.json is located
run: npm install

- name: Build Docusaurus site
working-directory: ./docs # Change to the directory where package.json is located
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build # Ensure this matches the build output directory of Docusaurus#
2 changes: 1 addition & 1 deletion .github/workflows/build_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
file: ./docker/Dockerfile.interlink
platforms: linux/amd64, linux/arm64

virtual-kubelet-refrest-token:
virtual-kubelet-refresh-token:
runs-on: ubuntu-latest
#env:
# DOCKER_TARGET_PLATFORM: linux/arm64
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/build_openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Update OpenAPI

on:
push:
tags:
- '*'

jobs:
update-openapi:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # specify the Python version you need

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r example/requirements.txt # if you have a requirements file
- name: Run script to generate OpenAPI JSON
run: python example/create_openapi.py

- name: Upload json to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./docs/openapi/openapi.json
asset_name: openAPISpec
tag: ${{ github.ref }}
overwrite: true
body: "OpenAPI spec for plugin REST"

Trigger-Docusaurus-Update:
uses: ./.github/workflows/build_docusaurus.yaml
14 changes: 4 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
#password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GH_CR_TOKEN }}
- name: Run plugin
run: |
wget https://github.com/interTwin-eu/interlink-docker-plugin/releases/download/0.0.22-no-gpu/docker-plugin_Linux_x86_64 -O docker-plugin \
Expand All @@ -30,10 +23,11 @@ jobs:
id: get_repo_owner
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
- name: Integration Test
uses: dagger/dagger-for-github@v5
uses: dagger/dagger-for-github@v6
with:
workdir: ci
verb: call
args: -s build-images --source-folder ../ --virtual-kubelet-ref ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/interlink/virtual-kubelet-inttw:$GITHUB_SHA --interlink-ref ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/interlink/interlink:$GITHUB_SHA new-interlink --manifests $PWD/manifests --plugin-local-service tcp://localhost:4000 test stdout
args: -s --name my-test build-images --source-folder ../ new-interlink --plugin-endpoint tcp://localhost:4000 --manifests ./manifests test stdout
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
#dagger-flags: -d
version: "0.11.9"
dagger-flags: -d
43 changes: 0 additions & 43 deletions .github/workflows/pages.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions ci/dagger.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "interlink",
"sdk": "go",
"dependencies": [
{
"name": "k3s",
"source": "github.com/marcosnils/daggerverse/k3s@e0bd6b9f5519c49db4b6eb0689927214720976f9"
}
],
"source": ".",
"engineVersion": "v0.11.9"
}
10 changes: 5 additions & 5 deletions ci/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ require (
github.com/Khan/genqlient v0.7.0
github.com/vektah/gqlparser/v2 v2.5.11
go.opentelemetry.io/otel v1.27.0
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0
go.opentelemetry.io/otel/log v0.3.0
go.opentelemetry.io/otel/sdk v1.27.0
go.opentelemetry.io/otel/sdk/log v0.3.0
go.opentelemetry.io/otel/trace v1.27.0
go.opentelemetry.io/proto/otlp v1.3.1
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
golang.org/x/sync v0.7.0
google.golang.org/grpc v1.64.0
Expand All @@ -24,13 +29,8 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/sosodev/duration v1.2.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect
go.opentelemetry.io/otel/log v0.3.0
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.3.0
go.opentelemetry.io/proto/otlp v1.3.1
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
Expand Down
Loading

0 comments on commit be83bfb

Please sign in to comment.