-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve github CI, and helm default docker version (#1415)
Add a docker build into the github CI, even if we don't use it, and also stop using latest as the default container version, as it is clearly wrong, and the latest tag hasn't been updated in a long time. travis-ci.org has stopped building the code for this repository as well, so we should focus on github workflows. Ideally we'd move the building of the docker container into github as well because then at least all CI is managed in one place. Signed-off-by: Tom Hellier <[email protected]>
- Loading branch information
1 parent
3a0e804
commit 537bab5
Showing
11 changed files
with
79 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,12 @@ jobs: | |
with: | ||
fetch-depth: 2 | ||
|
||
- name: Build Spark-Operator Docker Image | ||
run: | | ||
tag=$(git describe --tags --dirty)_v3.1.1 | ||
docker build -t gcr.io/spark-operator/spark-operator:${tag} . | ||
docker build -t gcr.io/spark-operator/spark-operator:local . | ||
- name: Install Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
|
@@ -68,8 +74,25 @@ jobs: | |
- name: Detect CRDs drift between chart and manifest | ||
run: make detect-crds-drift | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
- name: setup minikube | ||
uses: manusa/[email protected] | ||
with: | ||
minikube version: "v1.24.0" | ||
kubernetes version: "v1.20.8" | ||
start args: --memory 6g --cpus=2 --addons ingress | ||
github token: ${{ inputs.github-token }} | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install | ||
run: | | ||
tag=$(git describe --tags --dirty)_v3.1.1 | ||
minikube image load gcr.io/spark-operator/spark-operator:local | ||
ct install | ||
# The integration tests are currently broken see: https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/issues/1416 | ||
# - name: Run chart-testing (integration test) | ||
# run: make it-test | ||
|
||
- name: Setup tmate session | ||
if: failure() | ||
uses: mxschmitt/action-tmate@v3 | ||
timeout-minutes: 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,24 @@ jobs: | |
with: | ||
python-version: 3.7 | ||
|
||
# TODO: Maintainer of repository to follow: | ||
# https://github.com/docker/login-action#google-container-registry-gcr to add credentials so | ||
# we can push from github actions | ||
# - name: log in to container registry | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# registry: gcr.io | ||
# username: ${{ secrets.DOCKER_USERNAME }} | ||
# password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build Spark-Operator Docker Image | ||
run: | | ||
tag=$(git describe --tags --dirty)_v3.1.1 | ||
docker build -t gcr.io/spark-operator/spark-operator:${tag} . | ||
docker build -t gcr.io/spark-operator/spark-operator:local . | ||
echo "Ideally, we'd release the docker container at this point, but the maintainer of this repo needs to approve..." | ||
echo "docker push gcr.io/spark-operator/spark-operator:${tag}" | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
|
@@ -42,15 +60,27 @@ jobs: | |
- name: Run chart-testing (lint) | ||
run: ct lint | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
- name: setup minikube | ||
uses: manusa/[email protected] | ||
with: | ||
minikube version: "v1.24.0" | ||
kubernetes version: "v1.20.8" | ||
start args: --memory 6g --cpus=2 --addons ingress | ||
github token: ${{ inputs.github-token }} | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install | ||
run: | | ||
tag=$(git describe --tags --dirty)_v3.1.1 | ||
minikube image load gcr.io/spark-operator/spark-operator:local | ||
ct install | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
CR_RELEASE_NAME_TEMPLATE: "spark-operator-chart-{{ .Version }}" | ||
|
||
- name: Setup tmate session | ||
if: failure() | ||
uses: mxschmitt/action-tmate@v3 | ||
timeout-minutes: 15 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ci/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
image: | ||
tag: "local" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters