Skip to content

Commit 5d6792a

Browse files
committed
feat: Remove reset-branch machinery (upstream sets the right branch)
1 parent eeef487 commit 5d6792a

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include:
22
project: TankerHQ/gitlab-ci-files
3-
ref: 2021-12-16-236
3+
ref: 2022-08-19-248
44
file: /common.yml
55

66
############
@@ -55,15 +55,9 @@ stages:
5555
- poetry run python -m pip install --upgrade pip
5656
- poetry install
5757
- poetry run python run-ci.py download-artifacts --project-id=$UPSTREAM_PROJECT_ID --pipeline-id=$UPSTREAM_PIPELINE_ID --job-name=$UPSTREAM_JOB_NAME
58-
- poetry run python run-ci.py reset-branch $(cat branch_name.txt)
59-
- poetry run python -m pip install --upgrade pip
60-
- poetry install
6158

6259
.before-script/rbenv-path:
6360
before_script:
64-
- poetry run python -m pip install --upgrade pip
65-
- poetry install
66-
- poetry run python run-ci.py reset-branch $UPSTREAM_BRANCH_NAME
6761
- poetry run python -m pip install --upgrade pip
6862
- poetry install
6963
- export PATH=$HOME/.rbenv/versions/$RBENV_VERSION/bin:$PATH
@@ -73,9 +67,6 @@ stages:
7367
- poetry run python -m pip install --upgrade pip
7468
- poetry install
7569
- poetry run python run-ci.py download-artifacts --project-id=$UPSTREAM_PROJECT_ID --pipeline-id=$UPSTREAM_PIPELINE_ID --job-name=$UPSTREAM_JOB_NAME
76-
- poetry run python run-ci.py reset-branch $(cat branch_name.txt)
77-
- poetry run python -m pip install --upgrade pip
78-
- poetry install
7970
- export PATH=$HOME/.rbenv/versions/$RBENV_VERSION/bin:$PATH
8071

8172
#################
@@ -322,7 +313,6 @@ deploy:
322313
- .rules/deploy/ruby
323314
- .before-script/rbenv-path
324315
script:
325-
- poetry run python run-ci.py reset-branch $UPSTREAM_BRANCH_NAME
326316
- poetry run python run-ci.py deploy --version $SDK_RUBY_RELEASE_VERSION
327317
needs:
328318
- prepare/linux

run-ci.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ def main() -> None:
111111
dest="update",
112112
)
113113

114-
reset_branch_parser = subparsers.add_parser("reset-branch")
115-
reset_branch_parser.add_argument("branch", nargs="?")
116-
117114
download_artifacts_parser = subparsers.add_parser("download-artifacts")
118115
download_artifacts_parser.add_argument("--project-id", required=True)
119116
download_artifacts_parser.add_argument("--pipeline-id", required=True)
@@ -158,12 +155,6 @@ def main() -> None:
158155
deploy(args.version)
159156
elif command == "lint":
160157
lint()
161-
elif command == "reset-branch":
162-
fallback = os.environ["CI_COMMIT_REF_NAME"]
163-
ref = tankerci.git.find_ref(
164-
Path.cwd(), [f"origin/{args.branch}", f"origin/{fallback}"]
165-
)
166-
tankerci.git.reset(Path.cwd(), ref, clean=False)
167158
elif command == "download-artifacts":
168159
tankerci.gitlab.download_artifacts(
169160
project_id=args.project_id,

0 commit comments

Comments
 (0)