From 6b80c251ab7d6348912c70800c16385f7395b9c1 Mon Sep 17 00:00:00 2001 From: Afreen Misbah Date: Thu, 10 Oct 2024 12:19:14 +0530 Subject: [PATCH] 'fix: Add squid branch in builds - Squid branch is missing in ceph-dev builds. - Also removes google chat notification as we no longer use google chat. - Adding secrets as env variables as the workflow was not picking them Signed-off-by: Afreen Misbah --- .github/workflows/main.yml | 42 +++++++++++++++----------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 843771b4bc..483e19d641 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,12 @@ name: Publish ceph images on: push: - branches: + secrets: + DOCKER_PASSWORD: + required: true + DOCKER_USERNAME: + required: true + branches: - main paths: - .github/workflows/main.yml @@ -10,6 +15,11 @@ on: - 'docker/ceph/**/Dockerfile' - docker/ceph/rpm/set-ceph-repo.sh pull_request: + secrets: + DOCKER_PASSWORD: + required: true + DOCKER_USERNAME: + required: true branches: - main paths: @@ -34,16 +44,12 @@ jobs: uses: actions/checkout@master - name: Build run: docker build -t docker.io/rhcsdashboard/ceph-base:${{ matrix.os }} -f docker/ceph/centos/Dockerfile ./docker/ceph -# - name: Google Chat Notification -# uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1 -# with: -# name: Build -# url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }} -# status: ${{ job.status }} -# if: failure() - name: Push + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} run: | - echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin docker push docker.io/rhcsdashboard/ceph-base:${{ matrix.os }} docker logout build-ceph: @@ -52,7 +58,7 @@ jobs: strategy: fail-fast: false matrix: - branch: [main, reef, quincy, pacific] + branch: [main, squid, reef, quincy, pacific] name: [ceph, ceph-rpm] include: - centos_version: 9 @@ -65,13 +71,6 @@ jobs: uses: actions/checkout@master - name: Build run: docker build -t docker.io/rhcsdashboard/${{ matrix.name }}:${{ matrix.branch }} -f docker/${{ matrix.dir }}/${{ matrix.branch_dir}}/Dockerfile ./docker/ceph --build-arg CEPH_RELEASE=${{ matrix.branch }} --build-arg VCS_BRANCH=${{ matrix.branch }} --build-arg CENTOS_VERSION=${{ matrix.centos_version }} - - name: Google Chat Notification - uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1 - with: - name: Build - url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }} - status: ${{ job.status }} - if: failure() - name: Push run: | echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin @@ -82,19 +81,12 @@ jobs: strategy: fail-fast: false matrix: - branch: [main, reef, quincy, pacific] + branch: [main, squid, reef, quincy, pacific] steps: - name: Checkout uses: actions/checkout@master - name: Build run: docker build -t docker.io/rhcsdashboard/ceph-e2e:${{ matrix.branch }} -f docker/ceph/e2e/Dockerfile ./docker/ceph --build-arg VCS_BRANCH=${{ matrix.branch }} - - name: Google Chat Notification - uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1 - with: - name: Build - url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }} - status: ${{ job.status }} - if: failure() - name: Push run: | echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin