-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:pip-services3-go/pip-services3-rp…
…c-go
- Loading branch information
Showing
27 changed files
with
548 additions
and
206 deletions.
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,6 @@ | ||
/vendor | ||
/temp/* | ||
/docker/Dockerfile* | ||
/docker/docker-compose*.yml | ||
/*.ps1 | ||
/.github |
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,55 @@ | ||
name: Pip.Services RPC toolkit in Go | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**' | ||
- '!README.md' | ||
|
||
jobs: | ||
Default: | ||
runs-on: ubuntu-16.04 | ||
if: "!contains(github.event.head_commit.message, '[skip-ci]')" | ||
steps: | ||
- uses: actions/checkout@main | ||
|
||
############# Prepare ############# | ||
|
||
- name: Save build number and component version | ||
id: build_info | ||
run: | | ||
echo "##[set-output name=build_number;]$GITHUB_RUN_NUMBER" | ||
echo "##[set-output name=component_version;]$(jq -r '.version' ./component.json)" | ||
echo "##[set-output name=component_name;]$(jq -r '.name' ./component.json)" | ||
- name: Install powershell | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y wget apt-transport-https | ||
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb | ||
sudo dpkg -i packages-microsoft-prod.deb | ||
sudo apt-get update | ||
sudo apt-get install -y powershell | ||
############# Build and test ############# | ||
|
||
# - name: Build the component | ||
# run: ./build.ps1 | ||
|
||
- name: Test the component | ||
run: ./test.ps1 | ||
|
||
############# Release ############# | ||
|
||
- name: Tag branch with the build number | ||
uses: tvdias/[email protected] | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: "v${{ steps.build_info.outputs.component_version }}-${{ steps.build_info.outputs.build_number }}" | ||
|
||
############# Clear ############# | ||
|
||
- name: Clean temporary build artifacts | ||
if: ${{ always() }} | ||
run: ./clean.ps1 | ||
|
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 |
---|---|---|
@@ -1,8 +1,3 @@ | ||
.DS_Store | ||
/dist | ||
/vendor | ||
/data/configs.test.json | ||
/data/device_configs.json | ||
/docker/id_rsa* | ||
*.exe | ||
*.tmp | ||
/.vscode | ||
go.sum |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env pwsh | ||
|
||
Set-StrictMode -Version latest | ||
$ErrorActionPreference = "Stop" | ||
|
||
# Generate image and container names using the data in the "component.json" file | ||
$component = Get-Content -Path "component.json" | ConvertFrom-Json | ||
|
||
# Get buildnumber from github actions | ||
if ($env:GITHUB_RUN_NUMBER -ne $null) { | ||
$component.build = $env:GITHUB_RUN_NUMBER | ||
Set-Content -Path "component.json" -Value $($component | ConvertTo-Json) | ||
} | ||
|
||
$buildImage="$($component.registry)/$($component.name):$($component.version)-$($component.build)-build" | ||
$container=$component.name | ||
|
||
# Remove build files | ||
if (Test-Path "./dist") { | ||
$null = Remove-Item -Recurse -Force -Path "./dist/*" | ||
} else { | ||
$null = New-Item -ItemType Directory -Force -Path "./dist" | ||
} | ||
|
||
# Build docker image | ||
docker build -f docker/Dockerfile.build -t $buildImage . | ||
|
||
# Create and copy compiled files, then destroy | ||
docker create --name $container $buildImage | ||
docker cp "$($container):/app/run" ./dist/run | ||
docker rm $container | ||
|
||
if (!(Test-Path "./dist")) { | ||
Write-Host "dist folder doesn't exist in root dir. Build failed. Watch logs above." | ||
exit 1 | ||
} |
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 |
---|---|---|
@@ -1,7 +1,53 @@ | ||
# RPC components for Pip.Services in Golang Changelog | ||
# <img src="https://uploads-ssl.webflow.com/5ea5d3315186cf5ec60c3ee4/5edf1c94ce4c859f2b188094_logo.svg" alt="Pip.Services Logo" width="200"> <br/> Remote Procedure Calls Golang Changelog | ||
|
||
## <a name="1.0.1"></a> 1.0.1 (2020-08-05) | ||
## <a name="1.0.8-1.0.11"></a> 1.0.8-1.0.11 (2020-12-02) | ||
|
||
### Features | ||
* Fix response error method in HttpResponseSender | ||
|
||
* Added helper methods to RestOperations | ||
* Change RegisterWithAuth methods | ||
|
||
### Bug Fixes | ||
* Fix authorizer | ||
|
||
## <a name="1.0.7"></a> 1.0.7 (2020-11-20) | ||
|
||
### Features | ||
|
||
* Added swagger support | ||
|
||
## <a name="1.0.5-1.0.6"></a> 1.0.5-1.0.6 (2020-11-13) | ||
|
||
### Features | ||
|
||
* Added helper methods | ||
|
||
## <a name="1.0.3-1.0.4"></a> 1.0.3-1.0.4 (2020-11-12) | ||
|
||
### Features | ||
|
||
* Added helper methods in RestService | ||
|
||
### Bug Fixes | ||
* Fix signature CallCommand in CommandableHttpClient | ||
|
||
## <a name="1.0.1-1.0.2"></a> 1.0.1-1.0.2 (2020-08-05) | ||
|
||
### Features | ||
|
||
* Added error handler in Call method of RestClient | ||
|
||
### Bug Fixes | ||
* Fix response error method | ||
|
||
## <a name="1.0.0"></a> 1.0.0 (2020-01-28) | ||
|
||
Initial public release | ||
|
||
### Features | ||
|
||
* **build** HTTP service factory | ||
* **clients** mechanisms for retrieving connection settings | ||
* **connect** helper module to retrieve connections services and clients | ||
* **services** basic implementation of services for connecting | ||
|
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,24 @@ | ||
#!/usr/bin/env pwsh | ||
|
||
# Recreate image names using the data in the "component.json" file | ||
$component = Get-Content -Path "component.json" | ConvertFrom-Json | ||
$buildImage="$($component.registry)/$($component.name):$($component.version)-$($component.build)-build" | ||
$docsImage="$($component.registry)/$($component.name):$($component.version)-$($component.build)-docs" | ||
$testImage="$($component.registry)/$($component.name):$($component.version)-$($component.build)-test" | ||
|
||
# Clean up build directories | ||
Get-ChildItem -Path "." -Include "exe" -Recurse | foreach($_) { Remove-Item -Force -Recurse $_.FullName } | ||
|
||
# Remove docker images | ||
docker rmi $buildImage --force | ||
docker rmi $docsImage --force | ||
docker rmi $testImage --force | ||
docker image prune --force | ||
docker rmi -f $(docker images -f "dangling=true" -q) # remove build container if build fails | ||
|
||
# Remove existed containers | ||
$exitedContainers = docker ps -a | Select-String -Pattern "Exit" | ||
foreach($c in $exitedContainers) { docker rm $c.ToString().Split(" ")[0] } | ||
|
||
# Remove unused volumes | ||
docker volume rm -f $(docker volume ls -f "dangling=true") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "pip-services3-rpc-go", | ||
"registry": "github.com/pip-services3-go", | ||
"version": "3.0.0", | ||
"build": 0 | ||
} |
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.