Skip to content

Commit

Permalink
Cr 23090 (#693)
Browse files Browse the repository at this point in the history
* add encoding to git access token

* add encoding to git access token

* codefreshplugins/git-commit:0.1.4

* upgarde to ubuntu:jammy
  • Loading branch information
eti-codefresh authored Apr 30, 2024
1 parent 1b98a3a commit a0c39aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions incubating/git-commit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Moving to ubuntu instead of debian to solve high vulnerabilities
FROM ubuntu:jammy-20221101
# Moving to ubuntu instead of debian to solve high vulnerabilities
FROM ubuntu:jammy

RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install git bash openssl busybox -y && \
apt-get install git bash openssl busybox jq -y && \
ln -s /bin/busybox /usr/bin/[[

# Add ssh record on which ssh key to use
Expand Down
7 changes: 4 additions & 3 deletions incubating/git-commit/step.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kind: step-type
version: '1.0'
metadata:
name: git-commit
version: 0.1.3
version: 0.1.4
isPublic: true
description: Commit and push changes to repository
icon:
Expand Down Expand Up @@ -165,7 +165,7 @@ spec:

commit_and_push:
title: "Commit and push"
image: codefreshplugins/git-commit:0.1.3
image: codefreshplugins/git-commit:0.1.4
shell: bash
environment:
- REPO=${{repo}}
Expand Down Expand Up @@ -198,7 +198,8 @@ spec:
- git commit ${ALLOW_EMPTY} -m "${COMMIT_MESSAGE}"
- git status
- |-
REPO_URL="https://$GIT_ACCESS_TOKEN_USER:$GIT_ACCESS_TOKEN@$GIT_FQDN/$REPO.git"
ENCODED_GIT_ACCESS_TOKEN=$(echo -n "${GIT_ACCESS_TOKEN}" | jq -sRr @uri)
REPO_URL="https://$GIT_ACCESS_TOKEN_USER:$ENCODED_GIT_ACCESS_TOKEN@$GIT_FQDN/$REPO.git"
if [ "$USE_SSH" = "true" ]; then
[ -z "$PRIVATE_KEY" ] && (echo "missing PRIVATE_KEY var" | tee /dev/stderr) && exit 1
echo ${PRIVATE_KEY:1:-1} | sed 's/\\n/\n/g' > ~/.ssh/codefresh
Expand Down

0 comments on commit a0c39aa

Please sign in to comment.