mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
feat: package rainbond offline (#1417)
* feat: record the kaniko-executor version * feat: package rainbond offline
This commit is contained in:
parent
f449183889
commit
27e08d5717
@ -166,3 +166,45 @@ jobs:
|
||||
run: |
|
||||
cd rainbond-console
|
||||
./release.sh dind
|
||||
build-offline:
|
||||
needs: [ build-ui,build-rainbond-region,build-operator ]
|
||||
runs-on: ubuntu-18.04
|
||||
if: ${{ github.event.action }} == 'GitHub'
|
||||
steps:
|
||||
- name: Set up Python 3.6
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8 yapf==0.26.0
|
||||
- name: Pack offline packages
|
||||
env:
|
||||
IMAGE_NAMESPACE: ${{ secrets.IMAGE_NAMESPACE }}
|
||||
RBD_VER: ${{ github.event.client_payload.version }}
|
||||
TRAVIS_PULL_REQUEST: false
|
||||
DOMESTIC_NAMESPACE: ${{ secrets.DOMESTIC_NAMESPACE }}
|
||||
DOMESTIC_BASE_NAME: ${{ secrets.DOMESTIC_BASE_NAME }}
|
||||
run: |
|
||||
git clone -b ${{ github.event.client_payload.branch }} ${{ github.event.client_payload.clone_url }}/rainbond-console.git
|
||||
cd rainbond-console
|
||||
chmod +x ./release.sh
|
||||
- name: Build the Docker image
|
||||
env:
|
||||
TRAVIS_PULL_REQUEST: false
|
||||
IMAGE_NAMESPACE: ${{ secrets.IMAGE_NAMESPACE }}
|
||||
BUILD_IMAGE_NAMESPACE: ${{ secrets.BUILD_IMAGE_NAMESPACE }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
DOMESTIC_NAMESPACE: ${{ secrets.DOMESTIC_NAMESPACE }}
|
||||
DOMESTIC_DOCKER_PASSWORD: ${{ secrets.DOMESTIC_DOCKER_PASSWORD }}
|
||||
DOMESTIC_DOCKER_USERNAME: ${{ secrets.DOMESTIC_DOCKER_USERNAME }}
|
||||
VERSION: ${{ github.event.client_payload.version }}
|
||||
OPERATOR_BRANCH: ${{ secrets.OPERATOR_BRANCH }}
|
||||
ADAPTOR_BRANCH: ${{ secrets.ADAPTOR_BRANCH }}
|
||||
run: |
|
||||
cd rainbond-console
|
||||
OFFLINE="true" ./release.sh dind
|
||||
|
||||
|
@ -96,7 +96,8 @@ func (d *dockerfileBuild) runBuildJob(re *Request, buildImageName string) error
|
||||
volumes, mounts := d.createVolumeAndMount(re)
|
||||
podSpec.Volumes = volumes
|
||||
container := corev1.Container{
|
||||
Name: name,
|
||||
Name: name,
|
||||
//2022.11.4: latest==1.9.1
|
||||
Image: "registry.cn-hangzhou.aliyuncs.com/goodrain/kaniko-executor:latest",
|
||||
Stdin: true,
|
||||
StdinOnce: true,
|
||||
|
@ -393,7 +393,7 @@ func EncodeAuthToBase64(authConfig types.AuthConfig) (string, error) {
|
||||
func ImageBuild(contextDir, RbdNamespace, ServiceID, DeployVersion string, logger event.Logger, buildType, plugImageName string) error {
|
||||
// create image name
|
||||
var buildImageName string
|
||||
if buildType == "plug-build"{
|
||||
if buildType == "plug-build" {
|
||||
buildImageName = plugImageName
|
||||
} else {
|
||||
buildImageName = CreateImageName(ServiceID, DeployVersion)
|
||||
@ -425,7 +425,8 @@ func ImageBuild(contextDir, RbdNamespace, ServiceID, DeployVersion string, logge
|
||||
podSpec.Volumes = volumes
|
||||
// container config
|
||||
container := corev1.Container{
|
||||
Name: name,
|
||||
Name: name,
|
||||
//2022.11.4: latest==1.9.1
|
||||
Image: "registry.cn-hangzhou.aliyuncs.com/goodrain/kaniko-executor:latest",
|
||||
Stdin: true,
|
||||
StdinOnce: true,
|
||||
|
Loading…
Reference in New Issue
Block a user