Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add multi-arch Jenkins image support #51

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/build-dev-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,21 @@ jobs:
docker login --username ${{ secrets.DOCKER_HUB_USER }} --password ${{secrets.DOCKER_HUB_TOKEN}}

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 \
jcli cwp --install-artifacts --config-path formula.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
docker tag kubespheredev/ks-jenkins:$version-2.312 kubespheredev/ks-jenkins:dev-$version-2.312
docker push kubespheredev/ks-jenkins:dev-$version-2.312
- 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
docker tag kubespheredev/ks-jenkins:dev-$version-2.312 ghcr.io/kubesphere/ks-jenkins:dev-$version-2.312
docker push ghcr.io/kubesphere/ks-jenkins:dev-$version-2.312
6 changes: 1 addition & 5 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,13 @@ jobs:
run: |
docker login --username ${{ secrets.DOCKER_HUB_USER }} --password ${{secrets.DOCKER_HUB_TOKEN}}

mkdir -p ~/.m2
echo "${{secrets.MVN_SETTINGS}}" > ~/.m2/settings.xml
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=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.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 \
jcli cwp --install-artifacts --config-path formula.yaml --value-set output=push \
--value-set version=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
- name: Push Image
run: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,3 @@ jobs:
export PATH=.:$PATH:phantomjs/bin
jcli cwp --install-artifacts --config-path formula.yaml \
--value-set version=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
jcli cwp --install-artifacts --config-path formula-arm.yaml --value-set output=load \
--value-set version=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
Loading