From 38fcdf5d375e6b4e3314b59f4f13f3daf3f06a70 Mon Sep 17 00:00:00 2001 From: SylwiaBrant <45368349+SylwiaBrant@users.noreply.github.com> Date: Mon, 24 May 2021 12:13:27 +0200 Subject: [PATCH] #555 Add nightly release of a snapshot (#566) * #555 Add nightly release of a snapshot * Update README * Bump image and plugins * Bump image and plugins in Helm Chart --- .github/workflows/auto-tests.yaml | 1 + .github/workflows/deploy-nightly.yaml | 61 +++++++++++++++++++++++++++ Makefile | 2 +- README.md | 6 +++ chart/jenkins-operator/values.yaml | 2 +- 5 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy-nightly.yaml diff --git a/.github/workflows/auto-tests.yaml b/.github/workflows/auto-tests.yaml index 400a3d5f..d4a99de9 100644 --- a/.github/workflows/auto-tests.yaml +++ b/.github/workflows/auto-tests.yaml @@ -50,6 +50,7 @@ jobs: - name: Jenkins Operator - Helm Chart tests run: | + git reset --hard make helm-lint eval $(bin/minikube docker-env) make helm-e2e E2E_TEST_ARGS='-ginkgo.v' diff --git a/.github/workflows/deploy-nightly.yaml b/.github/workflows/deploy-nightly.yaml new file mode 100644 index 00000000..a454f3c7 --- /dev/null +++ b/.github/workflows/deploy-nightly.yaml @@ -0,0 +1,61 @@ +name: Publish nightly snapshot +on: + schedule: + - cron: '0 2 * * *' +jobs: + publish-image: + name: Publish nightly snapshot + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Set up env vars + run: | + echo "GO111MODULE=on" >> $GITHUB_ENV + echo "CHANGE_MINIKUBE_NONE_USER=true" >> $GITHUB_ENV + echo "MINIKUBE_WANTUPDATENOTIFICATION=false" >> $GITHUB_ENV + echo "MINIKUBE_WANTREPORTERRORPROMPT=false" >> $GITHUB_ENV + echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env)" >> $GITHUB_ENV + echo "HELM_VERSION=v$(sed -n 's/HELM_VERSION=//p' config.base.env)" >> $GITHUB_ENV + echo "GOPATH=/home/runner/go" >> $GITHUB_ENV + + - name: Prepare go environment + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Ensure Golang runtime dependencies + run: make go-dependencies + + - name: Verify code formatting + run: make verify + + - name: Prepare environment for e2e + run: | + sudo apt-get update + sudo apt-get install socat + sudo mkdir -p $HOME/.kube $HOME/.minikube + sudo chown -R $USER $HOME/.kube $HOME/.minikube + make minikube-start MINIKUBE_DRIVER='docker' CPUS_NUMBER=2 + + - name: Jenkins Operator - e2e + run: make e2e E2E_TEST_ARGS='-ginkgo.v' + + - name: Jenkins Operator - Helm Chart tests + run: | + git reset --hard + make helm-lint + eval $(bin/minikube docker-env) + make helm-e2e E2E_TEST_ARGS='-ginkgo.v' + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Release Container Runtime + run: | + git reset --hard + make container-runtime-snapshot-push diff --git a/Makefile b/Makefile index ccbc5e93..c5aa2f08 100644 --- a/Makefile +++ b/Makefile @@ -227,7 +227,7 @@ container-runtime-push: ## Push the container $(CONTAINER_RUNTIME_COMMAND) push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(BUILD_TAG) $(CONTAINER_RUNTIME_EXTRA_ARGS) .PHONY: container-runtime-snapshot-push -container-runtime-snapshot-push: +container-runtime-snapshot-push: container-runtime-build @echo "+ $@" $(CONTAINER_RUNTIME_COMMAND) tag $(DOCKER_REGISTRY):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(GITCOMMIT) $(CONTAINER_RUNTIME_EXTRA_ARGS) $(CONTAINER_RUNTIME_COMMAND) push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(GITCOMMIT) $(CONTAINER_RUNTIME_EXTRA_ARGS) diff --git a/README.md b/README.md index 60b063be..2f545c84 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,12 @@ Selected content: We have a dedicated channel called `#jenkins-operator` on [virtuslab-oss.slack.com](https://virtuslab-oss.slack.com) Fill out ([Invite form](https://forms.gle/X3X8qA1XMirdBuEH7)) and come say hi ! +## Snapshots between releases + +We are trying our best to resolve issues quickly, but they have to wait to be released. If you can't wait for an official +docker image release and acknowledge the risk, you can use our unofficial images, which are built nightly. +Look for the images with tag "{git-hash}", where {git-hash} is the hash of the master commit that interests you. + ## Contribution Feel free to file [issues](https://github.com/jenkinsci/kubernetes-operator/issues) or [pull requests](https://github.com/jenkinsci/kubernetes-operator/pulls). diff --git a/chart/jenkins-operator/values.yaml b/chart/jenkins-operator/values.yaml index bf417dbe..143d2538 100644 --- a/chart/jenkins-operator/values.yaml +++ b/chart/jenkins-operator/values.yaml @@ -73,7 +73,7 @@ jenkins: # - name: job-dsl # version: "1.77" # - name: configuration-as-code - # version: "1.50" + # version: "1.51" # - name: kubernetes-credentials-provider # version: 0.18-1 basePlugins: