Skip to content

Commit

Permalink
various: update references to tasks container image
Browse files Browse the repository at this point in the history
The tasks container is now on ghcr.io, not quay.io.  Update everything
that refers to it.

This was mostly a sed patch (with exceptions for related URLs in docs).
  • Loading branch information
allisonkarlitskaya committed Mar 18, 2024
1 parent e6cd467 commit ba86dfb
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ containers: tasks-container
@true

tasks-container:
$(DOCKER) build -t quay.io/cockpit/tasks:$(TAG) tasks/container
$(DOCKER) tag quay.io/cockpit/tasks:$(TAG) quay.io/cockpit/tasks:latest
$(DOCKER) build -t ghcr.io/cockpit-project/tasks:$(TAG) tasks/container
$(DOCKER) tag ghcr.io/cockpit-project/tasks:$(TAG) ghcr.io/cockpit-project/tasks:latest

tasks-secrets:
@cd tasks && ./build-secrets $(TASK_SECRETS)
4 changes: 2 additions & 2 deletions ansible/maintenance/deploy-tasks-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
shell: podman rmi --all || true

- name: Pre-pull current container image to avoid long downtime
command: podman pull quay.io/cockpit/tasks
command: podman pull ghcr.io/cockpit-project/tasks

- name: Tell tasks containers to drain and restart
command: pkill -ex cockpit-tasks
Expand All @@ -30,7 +30,7 @@
shell: podman rmi --all || true

- name: Pre-pull current container image to avoid long downtime
command: podman pull quay.io/cockpit/tasks
command: podman pull ghcr.io/cockpit-project/tasks

- name: Restart webhook pod
command: systemctl restart cockpituous-webhook.service
2 changes: 1 addition & 1 deletion ansible/roles/webhook/cockpituous-webhook.service
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ExecStart=/usr/bin/podman run \
--pull=always \
-e AMQP_SERVER=localhost:5671 \
-v /var/lib/cockpit-secrets/webhook:/run/secrets/webhook:ro,z \
quay.io/cockpit/tasks webhook
ghcr.io/cockpit-project/tasks webhook

ExecStop=/usr/bin/podman pod rm -f cockpituous

Expand Down
6 changes: 3 additions & 3 deletions tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Without arguments this will run some purely local integration tests:

This will also generate the secrets in a temporary directory, unless they
already exist in `tasks/credentials/`. By default this will use the
[`quay.io/cockpit/tasks:latest`](https://quay.io/repository/cockpit/tasks?tab=tags)
[`ghcr.io/cockpit-project/tasks:latest`](https://ghcr.io/cockpit-project/tasks)
container, but you can run a different tag by setting `$TASKS_TAG`.

You can also test the whole GitHub → webhook → tasks → GitHub status workflow
Expand All @@ -94,7 +94,7 @@ This container can also be used for local development with
development environment that's independent from the host:

```sh
toolbox create --image quay.io/cockpit/tasks cockpit
toolbox create --image ghcr.io/cockpit-project/tasks cockpit
toolbox enter cockpit
```

Expand Down Expand Up @@ -122,7 +122,7 @@ container like this:
```sh
podman run -it --rm --device=/dev/kvm --memory=6g --pids-limit=4096 --shm-size=256m \
--security-opt label=disable -v ~/.cache/cockpit-images:/cache/images \
-e TEST_JOBS=2 quay.io/cockpit/tasks bash
-e TEST_JOBS=2 ghcr.io/cockpit-project/tasks bash
```

Inside, you can then run a test, for example
Expand Down
2 changes: 1 addition & 1 deletion tasks/cockpit-tasks-centosci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
terminationGracePeriodSeconds: 3600
containers:
- name: cockpit-tasks
image: quay.io/cockpit/tasks
image: ghcr.io/cockpit-project/tasks
env:
# containers run as random user ID without passwd entry
- name: HOME
Expand Down
2 changes: 1 addition & 1 deletion tasks/cockpit-tasks-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
memory: 300M
cpu: 200m
- name: webhook
image: quay.io/cockpit/tasks
image: ghcr.io/cockpit-project/tasks
ports:
- containerPort: 8080
protocol: TCP
Expand Down
4 changes: 2 additions & 2 deletions tasks/install-service
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TimeoutStartSec=10min
ExecStartPre=-/usr/bin/podman rm -f cockpit-tasks-%i
# HACK: sometimes images get an MCS category which makes them undeletable by the container
ExecStartPre=/usr/bin/chcon -R -l s0 ${CACHE}/images/
ExecStartPre=/usr/bin/flock /tmp/cockpit-image-pull podman pull quay.io/cockpit/tasks
ExecStartPre=/usr/bin/flock /tmp/cockpit-image-pull podman pull ghcr.io/cockpit-project/tasks
# job-runner doesn't need /images, but we still need it for the run-queue store-tests task
ExecStart=/usr/bin/podman run --name=cockpit-tasks-%i --hostname=${CONTAINER_HOSTNAME} \
--volume=${CACHE}/images:/cache/images:rw \
Expand All @@ -63,7 +63,7 @@ ExecStart=/usr/bin/podman run --name=cockpit-tasks-%i --hostname=${CONTAINER_HOS
--env=GIT_AUTHOR_EMAIL=cockpituous@cockpit-project.org \
--env=TEST_NOTIFICATION_MX=${TEST_NOTIFICATION_MX} \
--env=TEST_NOTIFICATION_TO=${TEST_NOTIFICATION_TO} \
quay.io/cockpit/tasks cockpit-tasks --verbose
ghcr.io/cockpit-project/tasks cockpit-tasks --verbose
ExecStop=/usr/bin/podman rm -f cockpit-tasks-%i
[Install]
Expand Down
2 changes: 1 addition & 1 deletion tasks/mock-github
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Handler(MockHandler):
"head": {"sha": "a1b2c3"},
})
elif self.path == f'/{repo}/{sha}/.cockpit-ci/container':
self.replyData('quay.io/cockpit/tasks')
self.replyData('ghcr.io/cockpit-project/tasks')
else:
self.send_error(404, 'Mock Not Found: ' + self.path)

Expand Down
6 changes: 3 additions & 3 deletions tasks/run-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ EOF
--env=AMQP_SERVER=$AMQP_POD \
--env=COCKPIT_GITHUB_TOKEN_FILE=/run/secrets/webhook/.config--github-token \
--env=COCKPIT_GITHUB_WEBHOOK_TOKEN_FILE=/run/secrets/webhook/.config--github-webhook-token \
quay.io/cockpit/tasks:${TASKS_TAG:-latest} webhook
ghcr.io/cockpit-project/tasks:${TASKS_TAG:-latest} webhook
fi

# wait until AMQP initialized
Expand Down Expand Up @@ -260,7 +260,7 @@ EOF
--env=GIT_AUTHOR_NAME=Cockpituous \
--env=GIT_AUTHOR_EMAIL=cockpituous@cockpit-project.org \
--env=SKIP_STATIC_CHECK=1 \
quay.io/cockpit/tasks:${TASKS_TAG:-latest} bash
ghcr.io/cockpit-project/tasks:${TASKS_TAG:-latest} bash

# check out the correct bots, as part of what cockpit-tasks would usually do
podman exec -i cockpituous-tasks sh -euc \
Expand Down Expand Up @@ -578,7 +578,7 @@ test_podman() {
# this will be covered implicitly by job-runner, but as a more basal plumbing test this is easier to debug
out="$(podman exec -i cockpituous-tasks podman-remote --url unix:///podman.sock ps)"
assert_in 'cockpituous-tasks' "$out"
out="$(podman exec -i cockpituous-tasks podman-remote --url unix:///podman.sock run -it --rm quay.io/cockpit/tasks:latest whoami)"
out="$(podman exec -i cockpituous-tasks podman-remote --url unix:///podman.sock run -it --rm ghcr.io/cockpit-project/tasks:latest whoami)"
assert_in '^user' "$out"
}

Expand Down

0 comments on commit ba86dfb

Please sign in to comment.