Skip to content

Commit

Permalink
Merge pull request #62 from LinuxSuRen/multiarch
Browse files Browse the repository at this point in the history
Use the multiarch support instead of multiple images
  • Loading branch information
LinuxSuRen authored Dec 13, 2021
2 parents b8c7a03 + b6f5a5b commit 8947d85
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 645 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/build-dev-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- master
- "release-**"
- "dev-**"
- "add-**"

jobs:
build:
Expand Down Expand Up @@ -42,22 +40,13 @@ jobs:
curl -L https://github.com/jenkins-zh/jenkins-cli/releases/latest/download/jcli-linux-amd64.tar.gz|tar xzv
export PATH=.:$PATH:phantomjs/bin
jcli cwp --install-artifacts --config-path formula.yaml \
--value-set version=${{ steps.meta.outputs.version }}
# there's no a release for the multi-arch building but https://github.com/jenkinsci/custom-war-packager/releases/tag/v2.0-alpha-6
wget https://github.com/LinuxSuRen/custom-war-packager/releases/download/v2.0-alpha-6/custom-war-packager-cli-2.0-alpha-7-20210527.031403-1-jar-with-dependencies.jar
mv custom-war-packager-cli-2.0-alpha-7-20210527.031403-1-jar-with-dependencies.jar ~/.jenkins-cli/cwp-cli.jar
jcli cwp --install-artifacts --config-path formula-arm.yaml --value-set output=push \
--value-set version=${{ steps.meta.outputs.version }}
- name: Push Image
run: |
version=${{ steps.meta.outputs.version }}
docker tag kubespheredev/ks-jenkins:$version-2.249.1 kubespheredev/ks-jenkins:dev-$version-2.249.1
docker push kubespheredev/ks-jenkins:dev-$version-2.249.1
jcli cwp --install-artifacts --config-path formula.yaml --value-set output=push \
--value-set version=kubespheredev/ks-jenkins:${{ steps.meta.outputs.version }}
- name: Push Image ghcr.io
run: |
version=${{ steps.meta.outputs.version }}
docker login ghcr.io --username ${{ secrets.GH_USER }} --password ${{secrets.GH_TOKEN}}
docker tag kubespheredev/ks-jenkins:dev-$version-2.249.1 ghcr.io/kubesphere/ks-jenkins:dev-$version-2.249.1
docker push ghcr.io/kubesphere/ks-jenkins:dev-$version-2.249.1
jcli cwp --install-artifacts --config-path formula.yaml --value-set output=push \
--value-set tag=ghcr.io/kubesphere/ks-jenkins:${{ steps.meta.outputs.version }}
11 changes: 4 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ jobs:
run: |
curl -L https://github.com/jenkins-zh/jenkins-cli/releases/latest/download/jcli-linux-amd64.tar.gz|tar xzv
export PATH=.:$PATH:phantomjs/bin
wget https://github.com/LinuxSuRen/custom-war-packager/releases/download/v2.0-alpha-6/custom-war-packager-cli-2.0-alpha-7-20210527.031403-1-jar-with-dependencies.jar
mv custom-war-packager-cli-2.0-alpha-7-20210527.031403-1-jar-with-dependencies.jar ~/.jenkins-cli/cwp-cli.jar
jcli cwp --install-artifacts --config-path formula.yaml \
--value-set version=${{ steps.build_env.outputs.version }}
--value-set output=load \
--value-set tag=kubespheredev/ks-jenkins:${{ steps.build_env.outputs.version }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
if: github.event_name == 'pull_request'
Expand All @@ -62,9 +65,3 @@ jobs:
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: Build for arm
run: |
curl -L https://github.com/jenkins-zh/jenkins-cli/releases/latest/download/jcli-linux-amd64.tar.gz|tar xzv
export PATH=.:$PATH:phantomjs/bin
jcli cwp --install-artifacts --config-path formula-arm.yaml --value-set output=load \
--value-set version=${{ steps.build_env.outputs.version }}
Loading

0 comments on commit 8947d85

Please sign in to comment.