refactor: reorder tasks, use quotes

This commit is contained in:
f 2023-02-04 13:30:13 -03:00
parent 7dec608498
commit 230a020c99

View file

@ -1,32 +1,29 @@
pipeline: pipeline:
publish: publish:
image: registry.nulo.in/sutty/containers-gem-compiler:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH} image: "registry.nulo.in/sutty/containers-gem-compiler:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}"
pull: true pull: true
commands: commands:
- git checkout -B ${CI_COMMIT_BRANCH} - "apk add --no-cache openssh-client"
- bulk-compiler || true - "mkdir ~/.ssh/"
- git add built/ || true - "echo \"[nulo.in]:420 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHgHIbf5/jkeyLMndnWlEO12DPj41YPqkmz+aIreVOsP\" >> ~/.ssh/known_hosts"
- git add failed/ || true - "eval $(ssh-agent -s)"
- git config user.name Woodpecker - "echo \"$${SSH_KEY}\" | tr -d \"\\r\" | ssh-add -"
- git config user.email ci@nulo.in - "git config user.name Woodpecker"
- git remote add nulo ssh://_gitea@nulo.in:420/Sutty/gems.git - "git config user.email ci@nulo.in"
- git commit -m "[skip ci] built gems" || true - "git remote add nulo ssh://_gitea@gitea.nulo.in:420/Sutty/gems.git"
- apk add --no-cache openssh-client - "git checkout -B ${CI_COMMIT_BRANCH}"
- mkdir ~/.ssh/ - "bulk-compiler || true"
- echo '[nulo.in]:420 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHgHIbf5/jkeyLMndnWlEO12DPj41YPqkmz+aIreVOsP' >> ~/.ssh/known_hosts - "git add built/ failed/ && git commit -m \"[skip ci] built gems\" ; true"
- eval $(ssh-agent -s) - "git pull --rebase nulo ${CI_COMMIT_BRANCH}"
- echo "$${SSH_KEY}" | tr -d '\r' | ssh-add - - "git push nulo ${CI_COMMIT_BRANCH}"
- git pull --rebase nulo ${CI_COMMIT_BRANCH} - "git show HEAD | grep -q failed/ ; test $? -ne 0"
- git push nulo ${CI_COMMIT_BRANCH}
- git show HEAD | grep -q failed/ ; test $? -ne 0
secrets: secrets:
- HTTP_BASIC_USER - "HTTP_BASIC_USER"
- HTTP_BASIC_PASSWORD - "HTTP_BASIC_PASSWORD"
- SSH_KEY - "SSH_KEY"
when: when:
branch: antifascista branch: "antifascista"
event: push event: "push"
matrix: matrix:
include: include:
- ALPINE_VERSION: "3.17.1" - ALPINE_VERSION: "3.17.1"