Skip to content

Commit ba5873d

Browse files
k9ertmoneymanolis
andauthored
Chore: Tagging specterext-dummy with every release (#1944)
* Chore: Tagging specterext-dummy * update var * known hosts * yaml invalid * Activate release-jobs again Co-authored-by: Manolis Mandrapilias <[email protected]>
1 parent 65bb7d2 commit ba5873d

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.gitlab-ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,54 @@ release_docker:
235235
- echo "Triggering Docker Release"
236236
script:
237237
- ./utils/trigger_docker_build.sh
238+
239+
# Tagging the current master-branch of https://github.com/cryptoadvance/specterext-dummy
240+
# with the same CI_COMMIT_TAG
241+
tag_specterext_dummy_repo:
242+
stage: post_releasing
243+
only:
244+
- tags
245+
before_script:
246+
## Install ssh-agent if not already installed, it is required by Docker.
247+
## (change apt-get to yum if you use an RPM-based image)
248+
##
249+
- 'which ssh-agent || ( apk update && apk add --no-cache bash git openssh )'
250+
- docker info
251+
252+
##
253+
## Run ssh-agent (inside the build environment)
254+
##
255+
- eval $(ssh-agent -s)
256+
257+
##
258+
## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
259+
## We're using tr to fix line endings which makes ed25519 keys work
260+
## without extra base64 encoding.
261+
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
262+
##
263+
- echo "$SSH_SPECTEREXT_DEPLOY_KEY" | tr -d '\r' | ssh-add - > /dev/null
264+
265+
##
266+
## Create the SSH directory and give it the right permissions
267+
##
268+
- mkdir -p ~/.ssh
269+
- chmod 700 ~/.ssh
270+
271+
##
272+
## Optionally, if you will be using any Git commands, set the user name and
273+
## and email.
274+
##
275+
- git config --global user.email "specter@secretvalues"
276+
- git config --global user.name "specter"
277+
278+
##
279+
## Assuming you created the SSH_KNOWN_HOSTS variable, uncomment the
280+
## following two lines.
281+
##
282+
- echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts
283+
- chmod 644 ~/.ssh/known_hosts
284+
285+
script:
286+
- echo "Now tagging ... [email protected]:${CI_PROJECT_ROOT_NAMESPACE}/specterext-dummy.git"
287+
- ./utils/tag_specterext_dummy.sh
288+

utils/tag_specterext_dummy.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "This script will checkout github.com:${CI_PROJECT_ROOT_NAMESPACE}/specterext-dummy.git"
5+
echo "and tag it with ${CI_COMMIT_TAG}"
6+
7+
8+
git clone [email protected]:${CI_PROJECT_ROOT_NAMESPACE}/specterext-dummy.git
9+
10+
cd specterext-dummy
11+
git checkout master
12+
git tag ${CI_COMMIT_TAG}
13+
git push origin ${CI_COMMIT_TAG}

0 commit comments

Comments
 (0)