From 46e8a16b485c1c0289589dfd2cc118d26345550c Mon Sep 17 00:00:00 2001 From: dervoeti Date: Tue, 12 Dec 2023 14:03:51 +0100 Subject: [PATCH] Testing: New Harbor project names --- .github/pull_request_template.md | 3 ++- .github/workflows/build.yml | 16 ++++++++-------- Makefile | 6 +++--- .../airflow-operator/templates/deployment.yaml | 11 +++++++++-- rust-toolchain.toml | 2 +- 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 6a5be7e9..af7c0f6c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,6 +12,7 @@ # Author - [ ] Changes are OpenShift compatible - [ ] CRD changes approved +- [ ] CRD documentation for all fields, following the [style guide](https://docs.stackable.tech/home/nightly/contributor/style-guide). - [ ] Helm chart can be installed and deployed operator works - [ ] Integration tests passed (for non trivial changes) - [ ] Changes need to be "offline" compatible @@ -21,7 +22,7 @@ # Reviewer - [ ] Code contains useful comments - [ ] (Integration-)Test cases added -- [ ] Documentation added or updated +- [ ] Documentation added or updated. Follows the [style guide](https://docs.stackable.tech/home/nightly/contributor/style-guide). - [ ] Changelog updated - [ ] Cargo.toml only contains references to git tags (not specific commits or branches) ``` diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae4c1387..1e30d5be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - - uses: dtolnay/rust-toolchain@1.71.0 + - uses: dtolnay/rust-toolchain@1.74.0 - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: key: udeps @@ -83,7 +83,7 @@ jobs: if [[ $TRIGGER == "pull_request" ]]; then echo "exporting test as target helm repo: ${{ env.TEST_REPO_HELM_URL }}" echo "helm_repo=${{ env.TEST_REPO_HELM_URL }}" >> $GITHUB_OUTPUT - elif [[ $TRIGGER == "push" && ($GITHUB_REF == "refs/heads/main" || $GITHUB_REF == "refs/heads/trying")]]; then + elif [[ $TRIGGER == "push" && $GITHUB_REF == "refs/heads/main" ]]; then echo "exporting dev as target helm repo: ${{ env.DEV_REPO_HELM_URL }}" echo "helm_repo=${{ env.DEV_REPO_HELM_URL }}" >> $GITHUB_OUTPUT elif [[ ( $TRIGGER == "create" || $TRIGGER == "push" ) && $GITHUB_REF == refs/tags/* ]]; then @@ -121,7 +121,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - - uses: dtolnay/rust-toolchain@1.71.0 + - uses: dtolnay/rust-toolchain@1.74.0 with: components: rustfmt - run: cargo fmt --all -- --check @@ -137,7 +137,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - - uses: dtolnay/rust-toolchain@1.71.0 + - uses: dtolnay/rust-toolchain@1.74.0 with: components: clippy - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 @@ -170,7 +170,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - - uses: dtolnay/rust-toolchain@1.71.0 + - uses: dtolnay/rust-toolchain@1.74.0 with: components: rustfmt - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 @@ -190,7 +190,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - - uses: dtolnay/rust-toolchain@1.71.0 + - uses: dtolnay/rust-toolchain@1.74.0 - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: key: test @@ -252,7 +252,7 @@ jobs: with: version: v3.6.2 - name: Set up cargo - uses: dtolnay/rust-toolchain@1.71.0 + uses: dtolnay/rust-toolchain@1.74.0 - name: Set up rust-cache uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: @@ -312,7 +312,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - - uses: dtolnay/rust-toolchain@1.71.0 + - uses: dtolnay/rust-toolchain@1.74.0 with: components: rustfmt # This step checks if the current run was triggered by a push to a pr (or a pr being created). diff --git a/Makefile b/Makefile index 500f7d03..7d00c0ea 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,8 @@ VERSION := $(shell cargo metadata --format-version 1 | jq -r '.packages[] | sele DOCKER_REPO := docker.stackable.tech ORGANIZATION := stackable OCI_REGISTRY_HOSTNAME := oci.stackable.tech -OCI_REGISTRY_PROJECT_IMAGES := ${ORGANIZATION} -OCI_REGISTRY_PROJECT_CHARTS := ${ORGANIZATION}-charts +OCI_REGISTRY_PROJECT_IMAGES := sdp +OCI_REGISTRY_PROJECT_CHARTS := sdp-charts # This will be overwritten by an environmental variable if called from the github action HELM_REPO := https://repo.stackable.tech/repository/helm-dev HELM_CHART_NAME := ${OPERATOR_NAME} @@ -54,7 +54,7 @@ docker-publish: # Obtain the digest of the pushed image from the output of `docker push`, because signing by tag is deprecated and will be removed from cosign in the future\ REPO_DIGEST_OF_IMAGE=$$(echo "$$DOCKER_OUTPUT" | awk '/^${VERSION}: digest: sha256:[0-9a-f]{64} size: [0-9]+$$/ { print $$3 }');\ if [ -z "$$REPO_DIGEST_OF_IMAGE" ]; then\ - echo 'Could not find repo digest for container image: ${DOCKER_REPO}/${ORGANIZATION}/${OPERATOR_NAME}:${VERSION}';\ + echo 'Could not find repo digest for container image: ${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}';\ exit 1;\ fi;\ # This generates a signature and publishes it to the registry, next to the image\ diff --git a/deploy/helm/airflow-operator/templates/deployment.yaml b/deploy/helm/airflow-operator/templates/deployment.yaml index 44bfa1cf..f60334cd 100644 --- a/deploy/helm/airflow-operator/templates/deployment.yaml +++ b/deploy/helm/airflow-operator/templates/deployment.yaml @@ -14,11 +14,12 @@ spec: {{- include "operator.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: + internal.stackable.tech/image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + {{- with .Values.podAnnotations }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} labels: {{- include "operator.selectorLabels" . | nindent 8 }} spec: @@ -40,6 +41,12 @@ spec: volumeMounts: - mountPath: /etc/stackable/{{ include "operator.appname" . }}/config-spec name: config-spec + env: + - name: OPERATOR_IMAGE + # Tilt can use annotations as image paths, but not env variables + valueFrom: + fieldRef: + fieldPath: metadata.annotations['internal.stackable.tech/image'] volumes: - name: config-spec configMap: diff --git a/rust-toolchain.toml b/rust-toolchain.toml index aa464261..639f4f17 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.71.0" +channel = "1.74.0"