-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
177 additions
and
4 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 @@ | ||
v1.0.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
## global | ||
operator: | ||
albImagePullPolicy: IfNotPresent | ||
defaultAlb: false # 部署默认的alb | ||
operatorReplicas: 1 | ||
operatorDeployMode: "deployment" # csv|deployment | ||
global: | ||
labelBaseDomain: cpaas.io | ||
namespace: kube-system | ||
registry: | ||
address: theseedoaa | ||
images: | ||
alb2: | ||
code: https://github.com/alauda/alb | ||
support_arm: true | ||
repository: alb | ||
nginx: | ||
code: https://github.com/alauda/alb | ||
support_arm: true | ||
repository: alb-nginx | ||
resources: | ||
alb: | ||
limits: | ||
cpu: "200m" | ||
memory: 2Gi | ||
requests: | ||
cpu: 50m | ||
memory: 128Mi | ||
limits: | ||
cpu: "2" | ||
memory: 2Gi | ||
requests: | ||
cpu: 50m | ||
memory: 128Mi |
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,88 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- release-* | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**.md' | ||
- '.github/VERSION' | ||
push: | ||
branches: | ||
- master | ||
- release-* | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**.md' | ||
- '.github/VERSION' | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
env: | ||
GO_VERSION: '' | ||
GOSEC_VERSION: '2.18.2' | ||
HELM_VERSION: v3.13.3 | ||
SUBMARINER_VERSION: '0.16.2' | ||
IMAGE_REPO: "theseedoaa" | ||
jobs: | ||
build-alb: | ||
name: Build alb | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: jlumbroso/[email protected] | ||
with: | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
docker-images: false | ||
large-packages: false | ||
tool-cache: false | ||
swap-storage: false | ||
|
||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: azure/setup-helm@v3 | ||
with: | ||
version: '${{ env.HELM_VERSION }}' | ||
- name: build | ||
run: | | ||
source ./scripts/alb-dev-actions.sh | ||
branch=$(echo "$GITHUB_HEAD_REF" | sed 's|/|-|g') | ||
export VERSION="v$CURRENT_VERSION-$branch.$(date +%s)" | ||
OPENRESTY_BASE=theseedoaa/alb-nginx-base:v1.22.0 | ||
GO_BUILD_BASE=golang:1.18.10-alpine3.16 | ||
RUN_BASE=alpine:3.17.6 | ||
# build images | ||
docker buildx build --platform linux/amd64 -t /alb:$VERSION --build-arg VERSION=$VERSION --build-arg RUN_BASE=$RUN_BASE --build-arg BUILD_BASE=$GO_BUILD_BASE -o type=docker -f ./Dockerfile . | ||
docker pull $OPENRESTY_BASE | ||
docker buildx build --platform linux/amd64 -t alauda/alb-nginx:$VERSION --build-arg VERSION=$VERSION --build-arg OPENRESTY_BASE=$OPENRESTY_BASE --build-arg BUILD_BASE=$GO_BUILD_BASE -o type=docker -f ./template/Dockerfile ./ | ||
docker images | ||
docker save alauda/alb:$VERSION > alb.tar | ||
docker save alauda/alb-nginx:$VERSION > alb-nginx.tar | ||
ls | ||
env | ||
# build chart | ||
alb-build-github-chart $VERSION ./deploy/chart/alb ./alauda-alb2.tgz | ||
- name: Upload alb images to artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: alb | ||
path: alb.tar | ||
- name: Upload alb-nginx images to artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: alb-nginx | ||
path: alb-nginx.tar | ||
- name: Upload chart's to artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: alb-chart | ||
path: alauda-alb2.tgz |
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,22 @@ | ||
name: Release | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**.md' | ||
- '.github/VERSION' | ||
jobs: | ||
if_merged: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: version | ||
uses: HardNorth/[email protected] | ||
with: | ||
version-source: file | ||
version-file: .github/VERSION | ||
version-file-extraction-pattern: 'v(.+)' | ||
- run: | | ||
echo The PR was merged |
Empty file.
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,20 @@ | ||
#!/bin/bash | ||
function alb-build-github-chart() { | ||
# alb-build-github-chart $RELEASE_TAG ./chart/alb ./alb-chart.tar | ||
local version=$1 | ||
local chart_dir=$2 | ||
local out_path=$3 | ||
|
||
local branch=$GITHUB_HEAD_REF | ||
local commit=$GITHUB_SHA | ||
cp ./.github/chart/values.yaml $chart_dir | ||
yq -i e ".global.images.alb2.tag |= \"$version\"" $chart_dir/values.yaml | ||
yq -i e ".global.registry.address |= \"$IAMGE_REPO\"" $chart_dir/values.yaml | ||
yq -i e ".global.images.nginx.tag |= \"$version\"" $chart_dir/values.yaml | ||
yq -i e ".annotations.branch |= \"$branch\"" $chart_dir/Chart.yaml | ||
yq -i e ".annotations.commit |= \"$commit\"" $chart_dir/Chart.yaml | ||
|
||
helm package --debug $chart_dir --version $version | ||
mv ./alauda-alb2-$version.tgz $out_path | ||
return | ||
} |
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