diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7de9d804f..9e73137fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build on: pull_request: - branches: [master] + branches: [v1.12.x] types: [opened, synchronize, reopened] jobs: @@ -68,7 +68,7 @@ jobs: env: DOCKER_REPO: litmuschaos DOCKER_IMAGE: go-runner - DOCKER_TAG: ci + DOCKER_TAG: 1.12.x-ci run: | cd go/src/github.com/${{github.repository}} make build diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 92f4051a3..d9adf00af 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,7 +3,7 @@ name: Push on: push: branches: - - master + - v1.12.x tags-ignore: - '**' @@ -70,7 +70,7 @@ jobs: env: DOCKER_REPO: litmuschaos DOCKER_IMAGE: go-runner - DOCKER_TAG: ci + DOCKER_TAG: 1.12.x-ci run: | cd go/src/github.com/${{github.repository}} make experiment-build @@ -79,7 +79,7 @@ jobs: env: DOCKER_REPO: litmuschaos DOCKER_IMAGE: go-runner - DOCKER_TAG: ci + DOCKER_TAG: 1.12.x-ci DNAME: ${{ secrets.DNAME }} DPASS: ${{ secrets.DPASS }} run: | diff --git a/Makefile b/Makefile index 87112774f..3c1839cca 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,7 @@ image-build: @echo "-------------------------" @echo "--> Build go-runner image" @echo "-------------------------" - @sudo docker buildx build --file build/Dockerfile --progress plane --platform linux/arm64,linux/amd64 --no-cache --tag $(DOCKER_REPO)/$(DOCKER_IMAGE):$(DOCKER_TAG) . + @docker buildx build --file build/Dockerfile --progress plane --platform linux/arm64,linux/amd64 --no-cache --tag $(DOCKER_REPO)/$(DOCKER_IMAGE):$(DOCKER_TAG) . .PHONY: build-amd64 build-amd64: diff --git a/build/push b/build/push index 58e01431d..3a84bf14f 100755 --- a/build/push +++ b/build/push @@ -12,23 +12,23 @@ then exit 1 fi -IMAGEID=$( sudo docker images -q ${REPONAME}/${IMGNAME}:${IMGTAG} ) +IMAGEID=$( docker images -q ${REPONAME}/${IMGNAME}:${IMGTAG} ) if [ ! -z "${DNAME}" ] && [ ! -z "${DPASS}" ]; then - sudo docker login -u "${DNAME}" -p "${DPASS}"; + docker login -u "${DNAME}" -p "${DPASS}"; # Push image to docker hub echo "Pushing ${REPONAME}/${IMGNAME}:${IMGTAG} ..."; - sudo docker buildx build --file build/Dockerfile --push --progress plane --platform linux/arm64,linux/amd64 --no-cache --tag ${REPONAME}/${IMGNAME}:${IMGTAG} . + docker buildx build --file build/Dockerfile --push --progress plane --platform linux/arm64,linux/amd64 --no-cache --tag ${REPONAME}/${IMGNAME}:${IMGTAG} . if [ ! -z "${RELEASE_TAG}" ] ; then # Push with different tags if tagged as a release # When github is tagged with a release, then Travis will # set the release tag in env RELEASE_TAG echo "Pushing ${REPONAME}/${IMGNAME}:${RELEASE_TAG} ..."; - sudo docker buildx build --file build/Dockerfile --push --progress plane --platform linux/arm64,linux/amd64 --no-cache --tag ${REPONAME}/${IMGNAME}:${RELEASE_TAG} . + docker buildx build --file build/Dockerfile --push --progress plane --platform linux/arm64,linux/amd64 --no-cache --tag ${REPONAME}/${IMGNAME}:${RELEASE_TAG} . echo "Pushing ${REPONAME}/${IMGNAME}:latest ..."; - sudo docker buildx build --file build/Dockerfile --push --progress plane --platform linux/arm64,linux/amd64 --no-cache --tag ${REPONAME}/${IMGNAME}:latest . + docker buildx build --file build/Dockerfile --push --progress plane --platform linux/arm64,linux/amd64 --no-cache --tag ${REPONAME}/${IMGNAME}:latest . fi; else echo "No docker credentials provided. Skip uploading ${REPONAME}/${IMGNAME}:${IMGTAG} to docker hub";