e
This commit is contained in:
parent
5f4ab69c2c
commit
2ee59e85e4
@ -27,22 +27,32 @@ release:
|
|||||||
image: ubuntu:latest # Or any other basic image
|
image: ubuntu:latest # Or any other basic image
|
||||||
before_script:
|
before_script:
|
||||||
# Install Node.js v21.7.3 manually
|
# Install Node.js v21.7.3 manually
|
||||||
- apt-get update && apt-get install -y curl jq git
|
- apt-get update && apt-get install -y curl jq git openssh-client
|
||||||
- curl -fsSL https://deb.nodesource.com/setup_21.x | bash -
|
- curl -fsSL https://deb.nodesource.com/setup_21.x | bash -
|
||||||
- apt-get install -y nodejs
|
- apt-get install -y nodejs
|
||||||
- node -v # Verify the correct Node.js version
|
- node -v # Verify the correct Node.js version
|
||||||
# Install Gulp globally
|
# Install Gulp globally
|
||||||
- npm install --global gulp-cli
|
- npm install --global gulp-cli
|
||||||
- gulp --version # Verify Gulp is installed
|
- gulp --version # Verify Gulp is installed
|
||||||
|
# Prepare SSH
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- chmod 700 ~/.ssh
|
||||||
|
# Decode and set up the SSH private key
|
||||||
|
- echo "$SSH_PRIVATE_KEY_BASE64" | base64 -d > ~/.ssh/id_rsa
|
||||||
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
|
# Start the SSH agent and add the key
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- ssh-add ~/.ssh/id_rsa
|
||||||
|
# Add GitLab to known hosts to prevent authenticity prompt
|
||||||
|
- ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
|
||||||
|
# Set Git configuration
|
||||||
- git config --global user.name "GitLab CI"
|
- git config --global user.name "GitLab CI"
|
||||||
- git config --global user.email "ci@gitlab.com"
|
- git config --global user.email "ci@gitlab.com"
|
||||||
# Use the PAT for authentication
|
# Update the Git remote to use SSH
|
||||||
- git config --global credential.helper store
|
- git remote set-url origin git@gitlab.com:wintermyst/kidsonbrooms.git
|
||||||
- echo "https://oauth2:${GITLAB_PAT}@gitlab.com" > ~/.git-credentials
|
# Fetch and check out the master branch
|
||||||
- git remote set-url origin https://oauth2:${GITLAB_PAT}@gitlab.com/wintermyst/kidsonbrooms.git
|
- git fetch --unshallow
|
||||||
- git fetch --unshallow # Ensure we fetch all history for the branch (not a shallow clone)
|
- git checkout master
|
||||||
- git checkout master # Switch to the master branch
|
|
||||||
- git branch --set-upstream-to=origin/master master # Set the upstream to the master branch
|
|
||||||
script:
|
script:
|
||||||
# Check if VERSION is provided
|
# Check if VERSION is provided
|
||||||
- |
|
- |
|
||||||
|
Loading…
Reference in New Issue
Block a user