From 962b164ebea199a520248fe6347f6348b85fd3f7 Mon Sep 17 00:00:00 2001 From: Chris Grindstaff Date: Tue, 8 Jul 2025 14:22:21 -0400 Subject: [PATCH] ci: remove cr.netapp.io and jfrog --- docs/help/faq.md | 2 +- jenkins/artifacts/jenkinsfile | 33 ++++----------------------------- service/contrib/listTags.sh | 30 ------------------------------ 3 files changed, 5 insertions(+), 60 deletions(-) delete mode 100755 service/contrib/listTags.sh diff --git a/docs/help/faq.md b/docs/help/faq.md index 7baa1a543..f590b1d7c 100644 --- a/docs/help/faq.md +++ b/docs/help/faq.md @@ -81,7 +81,7 @@ Additional details: [here](https://stackoverflow.com/questions/38783424/promethe Harvest container images are published to both GitHub's image registry (ghcr.io) and Docker's image registry (hub.docker.com). By default, `ghcr.io` is used for pulling images. -Please note that `cr.netapp.io` is no longer being maintained. If you have been using `cr.netapp.io` to pull Harvest images, we encourage you to switch to `ghcr.io` or Docker Hub as your container image registry. Starting in 2024, we will cease publishing Harvest container images to `cr.netapp.io`. +Please note that `cr.netapp.io` is no longer maintained. If you have been using `cr.netapp.io` to pull Harvest images, please switch to `ghcr.io` or Docker Hub as your container image registry. Starting in 2024, we will cease publishing Harvest container images to `cr.netapp.io`. ### How do I switch between image registries? diff --git a/jenkins/artifacts/jenkinsfile b/jenkins/artifacts/jenkinsfile index 96acf7245..e53c88ecf 100644 --- a/jenkins/artifacts/jenkinsfile +++ b/jenkins/artifacts/jenkinsfile @@ -35,8 +35,6 @@ pipeline { imageName = "rahulguptajss/harvest" ghcrImage = "ghcr.io/netapp/harvest" DOCKERHUB_USERNAME = "rahulguptajss" - jfrogImagePrefix = "netappdownloads.jfrog.io/oss-docker-harvest-production/harvest" - jfrogRepo = "netappdownloads.jfrog.io" COMMIT_ID = sh(returnStdout: true, script: 'git rev-parse HEAD') } @@ -182,8 +180,8 @@ pipeline { sh ''' targetLocation=$targetParentLocation$VERSION-$RELEASE-$BRANCH docker login - docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET -t ${imageName}:latest -t ${imageName}:$VERSION-$RELEASE -t ${jfrogImagePrefix}:latest -t ${jfrogImagePrefix}:$VERSION-$RELEASE -t ${ghcrImage}:latest -t ${ghcrImage}:$VERSION-$RELEASE . --no-cache - docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET --build-arg GODEBUG=fips140=on -t ${imageName}:latest-fips -t ${imageName}:$VERSION-$RELEASE-fips -t ${jfrogImagePrefix}:latest-fips -t ${jfrogImagePrefix}:$VERSION-$RELEASE-fips -t ${ghcrImage}:latest-fips -t ${ghcrImage}:$VERSION-$RELEASE-fips . --no-cache + docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET -t ${imageName}:latest -t ${imageName}:$VERSION-$RELEASE -t ${ghcrImage}:latest -t ${ghcrImage}:$VERSION-$RELEASE . --no-cache + docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET --build-arg GODEBUG=fips140=on -t ${imageName}:latest-fips -t ${imageName}:$VERSION-$RELEASE-fips -t ${ghcrImage}:latest-fips -t ${ghcrImage}:$VERSION-$RELEASE-fips . --no-cache docker save -o ${targetLocation}/docker_harvest.tar ${ghcrImage}:latest docker save -o ${targetLocation}/docker_harvest_fips.tar ${ghcrImage}:latest-fips ''' @@ -301,22 +299,6 @@ pipeline { ''' } } - withCredentials([usernamePassword(credentialsId: 'Jfrog', passwordVariable: 'password', usernameVariable: 'username')]) { - sh ''' - docker login --username=$username --password=$password ${jfrogRepo} - docker push ${jfrogImagePrefix}:$VERSION-$RELEASE-fips - docker push ${jfrogImagePrefix}:$VERSION-$RELEASE - ''' - script { - currentStage = 'Docker Image Publish' - if (OVERWRITE_DOCKER_LATEST_TAG == 'true') { - sh ''' - docker push ${jfrogImagePrefix}:latest-fips - docker push ${jfrogImagePrefix}:latest - ''' - } - } - } } } @@ -345,8 +327,8 @@ pipeline { git push https://$GIT_TOKEN@github.com/NetApp/harvest.git --delete nightly fi /opt/home/gh_2.8.0_linux_386/bin/gh release create nightly $targetLocation/*.rpm $targetLocation/*.deb $targetLocation/*.gz --notes "Nightly builds may include bugs and other issues. You might want to use the stable releases instead." --title "Harvest Nightly Release" --prerelease --target main - docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET -t ${imageName}:latest -t ${imageName}:nightly -t ${jfrogImagePrefix}:latest -t ${jfrogImagePrefix}:nightly -t ${ghcrImage}:latest -t ${ghcrImage}:nightly . --no-cache - docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET --build-arg GODEBUG=fips140=on -t ${imageName}:latest-fips -t ${imageName}:nightly-fips -t ${jfrogImagePrefix}:latest-fips -t ${jfrogImagePrefix}:nightly-fips -t ${ghcrImage}:latest-fips -t ${ghcrImage}:nightly-fips . --no-cache + docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET -t ${imageName}:latest -t ${imageName}:nightly -t ${ghcrImage}:latest -t ${ghcrImage}:nightly . --no-cache + docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET --build-arg GODEBUG=fips140=on -t ${imageName}:latest-fips -t ${imageName}:nightly-fips -t ${ghcrImage}:latest-fips -t ${ghcrImage}:nightly-fips . --no-cache echo $GIT_TOKEN | docker login ghcr.io -u $DOCKERHUB_USERNAME --password-stdin docker push ${ghcrImage}:nightly-fips docker push ${ghcrImage}:nightly @@ -363,13 +345,6 @@ pipeline { docker push ${imageName}:nightly ''' } - withCredentials([usernamePassword(credentialsId: 'Jfrog', passwordVariable: 'password', usernameVariable: 'username')]) { - sh ''' - docker login --username=$username --password=$password ${jfrogRepo} - docker push ${jfrogImagePrefix}:nightly-fips - docker push ${jfrogImagePrefix}:nightly - ''' - } } } } diff --git a/service/contrib/listTags.sh b/service/contrib/listTags.sh deleted file mode 100755 index c67900e5a..000000000 --- a/service/contrib/listTags.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -set -e -#set -x - -IMAGE_NAME=harvest - -checkForJq() { - command -v jq >/dev/null 2>&1 || { - echo >&2 "jq is required but not found. Exiting. See https://stedolan.github.io/jq/download/" - exit 1 - } -} - -getToken() { - local response - - response=$(curl --silent "https://netappdownloads.jfrog.io/artifactory/api/docker/oss-docker/v2/token") - TOKEN=$(echo "$response" | jq '.token' | xargs echo) -} - -listTags() { - local imageName=$1 - - curl --silent --header "Authorization: Bearer $TOKEN" \ - https://netappdownloads.jfrog.io/artifactory/api/docker/oss-docker/v2/"$imageName"/tags/list | jq . -} - -checkForJq -getToken -listTags $IMAGE_NAME