Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T348506 Remove Git Tagging #492

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Docker/publish/tag_git/Dockerfile

This file was deleted.

40 changes: 0 additions & 40 deletions Docker/publish/tag_git/tag_git.sh

This file was deleted.

66 changes: 0 additions & 66 deletions docs/topics/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,72 +171,6 @@ Take a look at the `.env` file in the `example` directory and update the image t

Example commit: https://github.com/wmde/wikibase-release-pipeline/commit/73f9942ebd92ded5f17fbb7f8537e9f2268e2bc4

## Publish git tags

### Tag this repository

In order to keep a paper-trail of what commit was used to produce a certain release candidate.

You can find the `<COMMIT_HASH_FROM_THIS_REPO>` by looking up the `WORKFLOW_RUN_NUMBER` on GitHub in the UI.

https://github.com/wmde/wikibase-release-pipeline/actions/runs/<WORKFLOW_RUN_NUMBER>

![](https://i.imgur.com/UKBwYpS.png)

Or via CLI

```sh
gh run view <WORKFLOW_RUN_NUMBER> --json headSha
```

You can then run the following commands and replacing `<COMMIT_HASH_FROM_THIS_REPO>` with the commit that was used to create the Github action run that made the release.

```sh
git tag --force -a $WMDE_RELEASE_VERSION "<COMMIT_HASH_FROM_THIS_REPO>" -m $WMDE_RELEASE_VERSION
```

And pushing ...

```sh
git push --tags
```

### Tag WMDE maintained repositories

Together with the other publishing steps we also need to tag what commit in the gerrit repository with the version number we built and published. This is done by executing the commands given by the [tag_git](../../Docker/tag_git/tag_git.sh) bash script that is run within a docker container.

The script relies on the build metadata artifacts found within the folder of the downloaded workflow run.

Example: `artifacts/<WORKFLOW_RUN_NUMBER>/BuildMetadata/build_metadata_wikibase.env`

This file stores the commit hashes for the repositories we want to tag.

Run with:

```sh
./publish/git_tag.sh
```

Example output:
```
...

Use the following tag on Wikibase
git tag --force -a "wmde.0" "d9422cf7fe2c19d2096a158a68b1fa2d69e84406" -m "Tagging: wmde.0 Build: 581263144"


Use the following tag on WDQS frontend
git tag --force -a "wmde.0" "e84ab35125557ff073f42ba522a684d35c288b38" -m "Tagging: wmde.0 Build: 581263144"

...
```

Execute the commands in your local checked out repositories and push the tags using:

```sh
git push --tags
```

## Update documentation references

Update the links to this repository in the [mediawiki.org documentation](https://www.mediawiki.org/wiki/Wikibase/Docker) to point to the tag [that was added to this repository](#tag-this-repository)
Expand Down
14 changes: 0 additions & 14 deletions publish/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@ services:
- WORKFLOW_RUN_NUMBER
volumes:
- ../artifacts:/extractedArtifacts
tag_git:
build:
context: ../Docker/publish/tag_git
dockerfile: Dockerfile
environment:
- WORKFLOW_RUN_NUMBER
- WIKIBASE_BRANCH_NAME=master
- RELEASE_VERSION
- WMDE_RELEASE_VERSION
- DRY_RUN
volumes:
- ../artifacts/${WORKFLOW_RUN_NUMBER}:/extractedArtifacts
- ${HOME}/.gitconfig:/root/.gitconfig:ro
- ../git_cache/:/git_cache
upload_dockerhub:
build:
context: ../Docker/publish/upload_dockerhub
Expand Down
6 changes: 0 additions & 6 deletions publish/git_tag.sh

This file was deleted.