diff --git a/.github/workflows/Dockerfile-ks-jenkins-cache b/.github/workflows/Dockerfile-ks-jenkins-cache deleted file mode 100644 index eae170e..0000000 --- a/.github/workflows/Dockerfile-ks-jenkins-cache +++ /dev/null @@ -1,11 +0,0 @@ -FROM maven:3.8.1-jdk-11-openj9 as cache - -# Cache the maven local repository -RUN curl -L https://github.com/LinuxSuRen/http-downloader/releases/download/v0.0.29/hd-linux-amd64.tar.gz | tar xzv && \ - mv hd /usr/local/bin && \ - hd install jenkins-zh/jenkins-cli/jcli@v0.0.37 && \ - apt update -y && \ - apt install git make -y && \ - git clone https://github.com/kubesphere/ks-jenkins && \ - jcli cwp --install-artifacts --config-path ks-jenkins/formula.yaml || true && \ - rm -rf ks-jenkins diff --git a/.github/workflows/build-dev-image.yml b/.github/workflows/build-dev-image.yml index b43050c..4368b0a 100644 --- a/.github/workflows/build-dev-image.yml +++ b/.github/workflows/build-dev-image.yml @@ -39,8 +39,6 @@ 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 diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 5e311a8..f754124 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -52,3 +52,9 @@ jobs: run: | version=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} docker push kubespheredev/ks-jenkins:$version + - name: Push Image ghcr.io + run: | + version=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} + docker login ghcr.io --username ${{ secrets.GH_USER }} --password ${{secrets.GH_TOKEN}} + docker tag kubespheredev/ks-jenkins:$version ghcr.io/kubesphere/ks-jenkins:$version + docker push ghcr.io/kubesphere/ks-jenkins:$version diff --git a/.github/workflows/ks-jenkins-cache.yaml b/.github/workflows/ks-jenkins-cache.yaml deleted file mode 100644 index c0904c3..0000000 --- a/.github/workflows/ks-jenkins-cache.yaml +++ /dev/null @@ -1,141 +0,0 @@ -name: Build - -on: - push: - branches: - - master - - test-* # make it be easier for contributors to test - tags: - - 'v*.*.*' - pull_request: - branches: - - 'master' - -jobs: - BuildCache: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - name: Docker meta for KubeSphere - id: meta - if: github.repository_owner == 'kubesphere' - uses: docker/metadata-action@v3 - with: - images: | - ghcr.io/${{ github.repository_owner }}/ks-jenkins-build-cache - tags: | - type=schedule - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha - - name: Docker meta for Contributors - id: metaContributors - if: github.repository_owner != 'kubesphere' - uses: docker/metadata-action@v3 - with: - images: | - ghcr.io/${{ github.repository_owner }}/ks-jenkins-build-cache - tags: | - type=schedule - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to GHCR - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GH_TOKEN }} - - name: Build and push Docker images - uses: docker/build-push-action@v2.4.0 - if: github.repository_owner == 'kubesphere' - with: - file: .github/workflows/Dockerfile-ks-jenkins-cache - tags: ${{ steps.meta.outputs.tags }} - push: ${{ github.event_name != 'pull_request' }} - labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 - - name: Build and push Docker images for Contributors - uses: docker/build-push-action@v2.4.0 - if: github.repository_owner != 'kubesphere' - with: - file: .github/workflows/Dockerfile-ks-jenkins-cache - tags: ${{ steps.metaContributors.outputs.tags }} - push: ${{ github.event_name != 'pull_request' }} - labels: ${{ steps.metaContributors.outputs.labels }} - platforms: linux/amd64,linux/arm64 - - BuildGitPodImage: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - name: Docker meta for KubeSphere - id: meta - if: github.repository_owner == 'kubesphere' - uses: docker/metadata-action@v3 - with: - images: | - ghcr.io/${{ github.repository_owner }}/ks-jenkins-gitpod - tags: | - type=schedule - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha - - name: Docker meta for Contributors - id: metaContributors - if: github.repository_owner != 'kubesphere' - uses: docker/metadata-action@v3 - with: - images: | - ghcr.io/${{ github.repository_owner }}/ks-jenkins-gitpod - tags: | - type=schedule - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to GHCR - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GH_TOKEN }} - - name: Build and push Docker images - uses: docker/build-push-action@v2.4.0 - if: github.repository_owner == 'kubesphere' - with: - file: .gitpod.Dockerfile - tags: ${{ steps.meta.outputs.tags }} - push: ${{ github.event_name != 'pull_request' }} - labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 - - name: Build and push Docker images for Contributors - uses: docker/build-push-action@v2.4.0 - if: github.repository_owner != 'kubesphere' - with: - file: .gitpod.Dockerfile - tags: ${{ steps.metaContributors.outputs.tags }} - push: ${{ github.event_name != 'pull_request' }} - labels: ${{ steps.metaContributors.outputs.labels }} - platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 355aecc..0dee2b3 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -43,8 +43,6 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Build run: | - mkdir -p ~/.m2 - cat .github/workflows/settings.xml | base64 -d > ~/.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 \ diff --git a/.github/workflows/settings.xml b/.github/workflows/settings.xml deleted file mode 100644 index 329a41e..0000000 --- a/.github/workflows/settings.xml +++ /dev/null @@ -1,35 +0,0 @@ -PHNldHRpbmdzPgogIDxzZXJ2ZXJzPgogICAgPHNlcnZlcj4KICAgICAgPGlkPmdpdGh1Yi1jPC9p -ZD4KICAgICAgPHVzZXJuYW1lPkxpbnV4U3VSZW48L3VzZXJuYW1lPgogICAgICA8cGFzc3dvcmQ+ -Z2hwX3I3VFVaeHQ1V3pRZUJZcWtsbDNsZWhIY004N3RxUzRGR1JRODwvcGFzc3dvcmQ+CiAgICA8 -L3NlcnZlcj4KICAgIDxzZXJ2ZXI+CiAgICAgIDxpZD5naXRodWItYjwvaWQ+CiAgICAgIDx1c2Vy -bmFtZT5MaW51eFN1UmVuPC91c2VybmFtZT4KICAgICAgPHBhc3N3b3JkPmdocF9yN1RVWnh0NVd6 -UWVCWXFrbGwzbGVoSGNNODd0cVM0RkdSUTg8L3Bhc3N3b3JkPgogICAgPC9zZXJ2ZXI+CiAgICAg -ICAgPHNlcnZlcj4KICAgICAgPGlkPmdpdGh1Yi1hPC9pZD4KICAgICAgPHVzZXJuYW1lPkxpbnV4 -U3VSZW48L3VzZXJuYW1lPgogICAgICA8cGFzc3dvcmQ+Z2hwX3I3VFVaeHQ1V3pRZUJZcWtsbDNs -ZWhIY004N3RxUzRGR1JRODwvcGFzc3dvcmQ+CiAgICA8L3NlcnZlcj4KICAgIDxzZXJ2ZXI+CiAg -ICAgIDxpZD5naXRodWI8L2lkPgogICAgICA8dXNlcm5hbWU+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