Skip to content

Commit

Permalink
Initial code drop
Browse files Browse the repository at this point in the history
  • Loading branch information
alagishev committed Dec 27, 2024
1 parent ebffbc4 commit 7fe5189
Show file tree
Hide file tree
Showing 607 changed files with 95,039 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build Artifacts
on:
release:
types: [created]
push:
branches:
- '**'
env:
TAG_NAME: ${{ github.event.release.tag_name || github.ref }}

jobs:
multiplatform_build:
strategy:
fail-fast: false
matrix:
component:
- name: qubership-apihub-backend
file: Dockerfile
context: ""
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${GITHUB_ACTOR}
password: ${{secrets.GITHUB_TOKEN}}
- name: Prepare Tag
run: echo "TAG_NAME=$(echo ${TAG_NAME} | sed 's@refs/tags/@@;s@refs/heads/@@;s@/@_@g')" >> $GITHUB_ENV
- name: Get package IDs for delete
id: get-ids-for-delete
uses: Netcracker/get-package-ids@v0.0.1
with:
component-name: ${{ matrix.component.name }}
component-tag: ${{ env.TAG_NAME }}
access-token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
no-cache: true
context: ${{ matrix.component.context }}
file: ${{ matrix.component.file }}
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/netcracker/${{ matrix.component.name }}:${{ env.TAG_NAME }}
provenance: false
build-args: |
GH_ACCESS_TOKEN=${{ secrets.GH_ACCESS_TOKEN }}
- uses: actions/delete-package-versions@v5
with:
package-name: ${{ matrix.component.name }}
package-type: 'container'
package-version-ids: ${{ steps.get-ids-for-delete.outputs.ids-for-delete }}
if: ${{ steps.get-ids-for-delete.outputs.ids-for-delete != '' }}
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apihub-service/.idea
apihub-service/go.sum
.idea
.vscode
.history
apihub-service/data/**
apihub-service/static/**
apihub-service/logs/**
apihub-service/apihub-service.exe
apihub-service/__debug_bin.exe
apihub-service/apihub-service
logs
apihub-service/logs
apihub-service/tmp/**
apihub-service/bin/**

docs/local_development/jwt_private_key
*.patch
*.iml
*.bak
*.orig
*.exe
*.env
env
jwt_private_key

*.bak
*.patch
73 changes: 73 additions & 0 deletions CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Code of Conduct

This repository is governed by following code of conduct guidelines.

We put collaboration, trust, respect and transparency as core values for our community.
Our community welcomes participants from all over the world with different experience,
opinion and ideas to share.

We have adopted this code of conduct and require all contributors to agree with that to build a healthy,
safe and productive community for all.

The guideline is aimed to support a community where all people should feel safe to participate,
introduce new ideas and inspire others, regardless of:

* Age
* Gender
* Gender identity or expression
* Family status
* Marital status
* Ability
* Ethnicity
* Race
* Sex characteristics
* Sexual identity and orientation
* Education
* Native language
* Background
* Caste
* Religion
* Geographic location
* Socioeconomic status
* Personal appearance
* Any other dimension of diversity

## Our Standards

We are welcoming the following behavior:

* Be respectful for different ideas, opinions and points of view
* Be constructive and professional
* Use inclusive language
* Be collaborative and show the empathy
* Focus on the best results for the community

The following behavior is unacceptable:

* Violence, threats of violence, or inciting others to commit self-harm
* Personal attacks, trolling, intentionally spreading misinformation, insulting/derogatory comments
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Derogatory language
* Encouraging unacceptable behavior
* Other conduct which could reasonably be considered inappropriate in a professional community

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of the Code of Conduct
and are expected to take appropriate actions in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments,
commits, code, wiki edits, issues, and other contributions that are not aligned
to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors
that they deem inappropriate, threatening, offensive, or harmful.

## Reporting

If you believe you’re experiencing unacceptable behavior that will not be tolerated as outlined above,
please report to `opensourcegroup@netcracker.com`. All complaints will be reviewed and investigated and will result in a response
that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality
with regard to the reporter of an incident.

Please also report if you observe a potentially dangerous situation, someone in distress, or violations of these guidelines,
even if the situation is not happening to you.
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Contribution Guide

We'd love to accept patches and contributions to this project.
Please, follow these guidelines to make the contribution process easy and effective for everyone involved.

## Contributor License Agreement

You must sign the [Contributor License Agreement](https://pages.netcracker.com/cla-main.html) in order to contribute.

## Code of Conduct

Please make sure to read and follow the [Code of Conduct](CODE-OF-CONDUCT.md).
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM docker.io/golang:1.23.4-alpine3.21

MAINTAINER qubership.org

WORKDIR /app/qubership-apihub-service

USER root

RUN apk --no-cache add curl

ADD qubership-apihub-service/qubership-apihub-service ./qubership-apihub-service
ADD qubership-apihub-service/static ./static
ADD qubership-apihub-service/resources ./resources
ADD docs/api ./api

RUN chmod -R a+rwx /app

USER 10001

ENTRYPOINT ./qubership-apihub-service
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
# qubership-apihub-backend
# qubership-apihub-backend

qubership-apihub-backend is a part of global qubership-apihub application, which is described here: [qubership-apihub](https://github.com/Netcracker/qubership-apihub).

qubership-apihub-backend (aka API Registry) is the main backend microservice of qubership-apihub solution. It accumulates all bsuiness domain and core logic, provides REST API for qubership-apihub-ui and integrations.

## Installation

Partial installation of qubership-apihub-backend makes no sense as it is a part of bigger application qubership-apihub.
qubership-apihub installation is possible via docker-compose and helm. Please refer to installation guides: [qubership-apihub](https://github.com/Netcracker/qubership-apihub).

If you want to run qubership-apihub-backend only for developement or debugging purposes please refer to Debug section below


## Build

Just run build.cmd(sh) file from this repository


## Debug

[Local development principles](./docs/local_development/local_development.md)


## Developer Tools

[Development tools setup](./docs/newcomer_env_setup.md)
15 changes: 15 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Security Reporting Process

Please, report any security issue to `opensourcegroup@netcracker.com` where the issue will be triaged appropriately.

If you know of a publicly disclosed security vulnerability please IMMEDIATELY email `opensourcegroup@netcracker.com`
to inform the team about the vulnerability, so we may start the patch, release, and communication process.

# Security Release Process

If the vulnerability is found in the latest stable release, then it would be fixed in patch version for that release.
E.g., issue is found in 2.5.0 release, then 2.5.1 version with a fix will be released.
By default, older versions will not have security releases.

If the issue doesn't affect any existing public releases, the fix for medium and high issues is performed
in a main branch before releasing a new version. For low priority issues the fix can be planned for future releases.
9 changes: 9 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set GOSUMDB=off
set CGO_ENABLED=0
set GOOS=linux
cd ./qubership-apihub-service
go mod tidy
go mod download
go build .
cd ..
podman build ./ -t netcracker/qubership-apihub-backend
Loading

0 comments on commit 7fe5189

Please sign in to comment.