You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.3 KiB

# In buildable Repository:
5 years ago
## If configured as script build
5 years ago
Configure script that shall be executed by alfred relative to project root.
5 years ago
## If no script is configured
5 years ago
```text
.alfred
|- pre.sh
|- job.sh
|- post.sh
5 years ago
```
- Scripts are run in the mentioned order
- No further semantics are connected to them
- If single files are missing they are skipped
## Environment variables
5 years ago
- `ALFRED_LOG_FILE`: Path to the log file of the current build
- `ALFRED_REV`: Revision string passed to the trigger URL
- All environment variables configured in the build config on the alfred server
5 years ago
# On Alfred server
```text
$ALFRED_HOME
|- builds
|- $buildId.properties
|- $buildId2.properties
```
5 years ago
## $buildId.properties
5 years ago
Example: `static-site.properties`
5 years ago
```properties
user=nonroot
apikey=4711
5 years ago
# single script execution
script=/home/nonroot/static-site/build.sh
# git based execution
git.repo.url=https://some-git-server.tld/some-git-repo/url
git.clone.timeout=30
git.workspace=/tmp/workspaces/static-site
# environment variables
SOME_ENV=SOME_ENV_VALUE
FOO=BAR
```
5 years ago
In this case the executable configured by `script` will be called. Otherwise, alfred would try to clone the repository configured by `gitrepo` under the path configured by `workspace` and the scripts `.alfred/pre.sh`, `.alfred/job.sh` and `.alfred/post.sh` will be called,