Skip to content

Commit

Permalink
Rename gitjob image
Browse files Browse the repository at this point in the history
Naming that image `rancher/gitjob` instead of `rancher/fleet-gitjob`
should allow us to keep releasing it with existing permissions.

The risk of confusion for `rancher/gitjob` users is minimal, given that
only Fleet is expected to use that repository and its images.
  • Loading branch information
weyfonk committed Feb 14, 2024
1 parent 3bc34ac commit 8751988
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ steps:
dockerfile: package/Dockerfile.gitjob
password:
from_secret: docker_password
repo: "rancher/fleet-gitjob"
repo: "rancher/gitjob"
tag: "${DRONE_TAG}-linux-amd64"
username:
from_secret: docker_username
Expand Down Expand Up @@ -217,7 +217,7 @@ steps:
dockerfile: package/Dockerfile.gitjob
password:
from_secret: docker_password
repo: "rancher/fleet-gitjob"
repo: "rancher/gitjob"
tag: "${DRONE_TAG}-linux-arm64"
username:
from_secret: docker_username
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/build-fleet-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export GOARCH="${GOARCH:-amd64}"

docker build -f package/Dockerfile -t rancher/fleet:dev --build-arg="ARCH=$GOARCH" .
docker build -f package/Dockerfile.agent -t rancher/fleet-agent:dev --build-arg="ARCH=$GOARCH" .
docker build -f package/Dockerfile.gitjob -t rancher/fleet-gitjob:dev --build-arg="ARCH=$GOARCH" .
docker build -f package/Dockerfile.gitjob -t rancher/gitjob:dev --build-arg="ARCH=$GOARCH" .
2 changes: 1 addition & 1 deletion .github/scripts/deploy-fleet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ else
fleetTag="dev"
agentRepo="rancher/fleet-agent"
agentTag="dev"
gitjobRepo="rancher/fleet-gitjob"
gitjobRepo="rancher/gitjob"
gitjobTag="dev"
fi

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ jobs:
tags: ${{ steps.meta-fleet-agent.outputs.tags }}
labels: ${{ steps.meta-fleet-agent.outputs.labels }}
-
id: meta-fleet-gitjob
id: meta-gitjob
uses: docker/metadata-action@v5
with:
images: |
ttl.sh/rancher/fleet-gitjob-${{ steps.uuid.outputs.uuid }}
ttl.sh/rancher/gitjob-${{ steps.uuid.outputs.uuid }}
tags: type=raw,value=1h
-
uses: docker/build-push-action@v5
Expand All @@ -136,14 +136,14 @@ jobs:
build-args: |
ARCH=${{ env.GOARCH }}
push: true
tags: ${{ steps.meta-fleet-gitjob.outputs.tags }}
labels: ${{ steps.meta-fleet-gitjob.outputs.labels }}
tags: ${{ steps.meta-gitjob.outputs.tags }}
labels: ${{ steps.meta-gitjob.outputs.labels }}
-
name: Deploy Fleet
run: |
export KUBECONFIG="$GITHUB_WORKSPACE/kubeconfig-fleet-ci"
echo "${{ steps.meta-fleet.outputs.tags }} ${{ steps.meta-fleet-agent.outputs.tags }}"
./.github/scripts/deploy-fleet.sh ${{ steps.meta-fleet.outputs.tags }} ${{ steps.meta-fleet-agent.outputs.tags }} ${{ steps.meta-fleet-gitjob.outputs.tags }}
./.github/scripts/deploy-fleet.sh ${{ steps.meta-fleet.outputs.tags }} ${{ steps.meta-fleet-agent.outputs.tags }} ${{ steps.meta-gitjob.outputs.tags }}
-
name: Fleet E2E Tests
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
-
name: Import Images Into k3d
run: |
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev rancher/fleet-gitjob:dev nginx-git:test
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev rancher/gitjob:dev nginx-git:test
-
name: Set Up Tmate Debug Session
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.enable_tmate == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-multicluster-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
-
name: Import Images Into k3d
run: |
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev rancher/fleet-gitjob:dev -c upstream
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev rancher/gitjob:dev -c upstream
./.github/scripts/k3d-import-retry.sh rancher/fleet-agent:dev -c downstream
-
name: Set Up Tmate Debug Session
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fleet-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
-
name: Import Images Into k3d
run: |
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev rancher/fleet-gitjob:dev -c upstream
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev rancher/gitjob:dev -c upstream
-
name: Verify Example Workload
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ jobs:
tags: ${{ steps.meta-fleet-agent.outputs.tags }}
labels: ${{ steps.meta-fleet-agent.outputs.labels }}
-
id: meta-fleet-gitjob
id: meta-gitjob
uses: docker/metadata-action@v5
with:
images: |
ttl.sh/rancher/fleet-gitjob-${{ steps.uuid.outputs.uuid }}
ttl.sh/rancher/gitjob-${{ steps.uuid.outputs.uuid }}
tags: type=raw,value=1h
-
uses: docker/build-push-action@v5
Expand All @@ -141,13 +141,13 @@ jobs:
build-args: |
ARCH=${{ env.GOARCH }}
push: true
tags: ${{ steps.meta-fleet-gitjob.outputs.tags }}
labels: ${{ steps.meta-fleet-gitjob.outputs.labels }}
tags: ${{ steps.meta-gitjob.outputs.tags }}
labels: ${{ steps.meta-gitjob.outputs.labels }}
-
name: Deploy Fleet
run: |
echo "${{ steps.meta-fleet.outputs.tags }} ${{ steps.meta-fleet-agent.outputs.tags }}"
./.github/scripts/deploy-fleet.sh ${{ steps.meta-fleet.outputs.tags }} ${{ steps.meta-fleet-agent.outputs.tags }} ${{ steps.meta-fleet-gitjob.outputs.tags }}
./.github/scripts/deploy-fleet.sh ${{ steps.meta-fleet.outputs.tags }} ${{ steps.meta-fleet-agent.outputs.tags }} ${{ steps.meta-gitjob.outputs.tags }}
-
name: Fleet E2E Tests
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
-
name: Import Images Into k3d
run: |
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev rancher/fleet-gitjob:dev nginx-git:test
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev rancher/gitjob:dev nginx-git:test
-
name: Set Up Tmate Debug Session
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.enable_tmate == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion charts/fleet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ leaderElection:
renewDeadline: 25s

gitjob:
repository: rancher/fleet-gitjob
repository: rancher/gitjob
tag: dev
imagePullPolicy: IfNotPresent
nodeSelector:
Expand Down
2 changes: 1 addition & 1 deletion cmd/gitjob/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func bindFlags() flags {
flag.StringVar(
&image,
"gitjob-image",
"rancher/fleet-gitjob:dev",
"rancher/gitjob:dev",
"The gitjob image that will be used in the generated job.",
)
flag.StringVar(&listen, "listen", ":8080", "The port the webhook listens.")
Expand Down
2 changes: 1 addition & 1 deletion dev/build-fleet
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ docker build -f package/Dockerfile.agent -t rancher/fleet-agent:dev --build-arg=
go build -gcflags='all=-N -l' -o "bin/gitcloner-linux-$GOARCH" ./cmd/gitcloner
go build -gcflags='all=-N -l' -o "bin/gitjob-linux-$GOARCH" ./cmd/gitjob

docker build -f package/Dockerfile.gitjob -t rancher/fleet-gitjob:dev --build-arg="ARCH=$GOARCH" .
docker build -f package/Dockerfile.gitjob -t rancher/gitjob:dev --build-arg="ARCH=$GOARCH" .
2 changes: 1 addition & 1 deletion dev/import-images-k3d
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euxo pipefail
upstream_ctx="${FLEET_E2E_CLUSTER-k3d-upstream}"
downstream_ctx="${FLEET_E2E_CLUSTER_DOWNSTREAM-k3d-downstream}"

k3d image import rancher/fleet:dev rancher/fleet-agent:dev rancher/fleet-gitjob:dev -m direct -c "${upstream_ctx#k3d-}"
k3d image import rancher/fleet:dev rancher/fleet-agent:dev rancher/gitjob:dev -m direct -c "${upstream_ctx#k3d-}"

if [ "$upstream_ctx" != "$downstream_ctx" ]; then
k3d image import rancher/fleet-agent:dev -m direct -c "${downstream_ctx#k3d-}"
Expand Down
6 changes: 3 additions & 3 deletions manifest-gitjob.tmpl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
image: rancher/fleet-gitjob:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-head{{/if}}
image: rancher/gitjob:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-head{{/if}}
manifests:
-
image: rancher/fleet-gitjob:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-head{{/if}}-linux-amd64
image: rancher/gitjob:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-head{{/if}}-linux-amd64
platform:
architecture: amd64
os: linux
-
image: rancher/fleet-gitjob:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-head{{/if}}-linux-arm64
image: rancher/gitjob:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-head{{/if}}-linux-arm64
platform:
architecture: arm64
os: linux

0 comments on commit 8751988

Please sign in to comment.