Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
f9b5d62
load and print machine setup info from .setup_info (#364)
TingluoHuang Mar 11, 2020
53fb629
Change problem matchers output to debug (#363)
konradpabjan Mar 12, 2020
c8890d0
Expose job name as $GITHUB_JOB (#366)
TingluoHuang Mar 13, 2020
2d60424
add support for job outputs. (#365)
TingluoHuang Mar 14, 2020
aa9f5bf
adr step output and conclusion (#274)
ericsciple Mar 16, 2020
41f4ca3
grammar (#373)
jsoref Mar 17, 2020
a5eb8cb
set CI=true when launch process in actions runner. (#374)
TingluoHuang Mar 17, 2020
88875ca
set steps.<id>.outcome and steps.<id>.conclusion. (#372)
TingluoHuang Mar 18, 2020
b0a7148
support defaults. (#369)
TingluoHuang Mar 18, 2020
dfaf6e0
switch hashFiles to extension function (#362)
ericsciple Mar 18, 2020
178a618
expose GITHUB_REPOSITORY_OWNER. (#378)
TingluoHuang Mar 20, 2020
ab001a7
Add expanded volumes strings to container mounts (#384)
Mar 23, 2020
9fc0686
prepare 2.168.0 runner release.
TingluoHuang Mar 24, 2020
dff1024
cache actions on premises (#381)
ericsciple Mar 25, 2020
e23d68f
add github.url and github.api_url for ghes alpha (#386)
ericsciple Mar 25, 2020
3d70ef2
update workflow schema file. (#388)
TingluoHuang Mar 27, 2020
b0a1294
Fix API URL for GHES (#390)
ericsciple Mar 27, 2020
dec2609
spelling: deprecate (#394)
jsoref Mar 30, 2020
be325f2
support config with GHES url. (#393)
TingluoHuang Mar 30, 2020
a5f06b3
ADR 397: Configuration time custom labels (#397)
bryanmacfarlane Mar 30, 2020
0e8777e
ADR for wrapper action (#361)
TingluoHuang Mar 31, 2020
ba69b5b
Fix runner config IsHostedServer detection for GHES alpha (#401)
ericsciple Apr 1, 2020
83b5742
Bump acorn from 6.4.0 to 6.4.1 in /src/Misc/expressionFunc/hashFiles …
dependabot[bot] Apr 7, 2020
1f52dfa
bump dev-dependency version.
TingluoHuang Apr 7, 2020
2cdde6c
fix L0 test.
TingluoHuang Apr 7, 2020
d90273a
Raise warning when volume mount root. (#413)
TingluoHuang Apr 8, 2020
7817e1a
Prepare 2.169.0 runner release for GHES Alpha.
TingluoHuang Apr 8, 2020
baa6ded
Better Kusto Tracing for self-hosted runner. (#405)
TingluoHuang Apr 9, 2020
2bd0b1a
launch middle man process on macOS to workaround SIP limit (#416)
TingluoHuang Apr 9, 2020
a20ad4e
Update `releaseVersion` to v2.168.0 (#420)
chenrui333 Apr 11, 2020
f9baec4
Added support for custom labels (#414)
lokesh755 Apr 14, 2020
d5c7097
support 'pre' execution for actions. (#389)
TingluoHuang Apr 14, 2020
117ec1f
Fix optional parameter for unattended (#425)
lokesh755 Apr 14, 2020
c126b52
ArgumentNullException: Value cannot be null, for anonymous volume mou…
Apr 14, 2020
b2dcdc2
Sample scripts to automate scaleable runners (#427)
bryanmacfarlane Apr 17, 2020
c5fa9fb
Print node version in debug instead of output. (#433)
TingluoHuang Apr 17, 2020
97883c8
Fix spelling of RHEL and CentOS. (#436)
adelton Apr 19, 2020
9f78ad3
Make release notes code blocks copy-paste-able (#430)
Geod24 Apr 20, 2020
d5c54f9
Raise warning when action input does not match action.yml. (#429)
TingluoHuang Apr 21, 2020
3f7a01a
add secret masker for trimming double qoutes. (#440)
TingluoHuang Apr 22, 2020
f798f56
Use the API_URL and munge action URLs for GHES (#437)
pjquirk Apr 23, 2020
2fadf43
post-alpha fixes for github.url github.api_url and github.graphql_url…
ericsciple Apr 24, 2020
1470a3b
better error when runner removed from service. (#441)
TingluoHuang Apr 28, 2020
70729fb
Help trace worker crash in Kusto. (#450)
TingluoHuang Apr 28, 2020
c7768d4
Adapt create-latest-svc.sh to work with GHES (#452)
brcrista Apr 28, 2020
a246b3b
Add CodeQL Analysis workflow (#459)
jhutchings1 May 7, 2020
33d2d2c
update checkout@v1 for GHES (#470)
ericsciple May 11, 2020
01c9a8a
Remove community actions munging and add dotcom fallback for download…
pjquirk May 11, 2020
911135e
add help info for '--labels' (#472)
TingluoHuang May 11, 2020
6922f3c
sps/token migration tweak, ActionResult casing. (#462)
TingluoHuang May 11, 2020
462b511
docker build using -f instead of implied default (#471)
May 11, 2020
7a65236
prepare 2.262.0 runner release.
TingluoHuang May 11, 2020
09cf59c
Use an env var to point to an Actions Service dev instance (#468)
brcrista May 11, 2020
abf59bd
Fix configure as service with runner name has space. (#474)
TingluoHuang May 12, 2020
cd8e4dd
Validate inputs only for repo action, no warning for small delay. (#476)
TingluoHuang May 12, 2020
73307c0
jq returns "null" if the field does not exist (#478)
itscaro May 14, 2020
b45c1b9
switch GITHUB_URL to GITHUB_SERVER_URL (#482)
ericsciple May 18, 2020
4fc87dd
fix problem matcher for GHES (#488)
ericsciple May 19, 2020
6f26001
Fix inputs validation warning, fix post step display name, fix worker…
TingluoHuang May 21, 2020
1143585
prepare 2.263.0 runner release.
TingluoHuang May 21, 2020
416a7ac
prepare to switch to service resolves archive download info (#508)
ericsciple Jun 2, 2020
c4626d0
Remove SPS/Token migration code. Remove GHES url manipulate code. (#513)
TingluoHuang Jun 4, 2020
3c5aef7
Fix null ref exception in SecretMasker caused by hashfiles timeout. (…
TingluoHuang Jun 6, 2020
f994ae0
Reduce input validation warnings (#506)
nick-invision Jun 6, 2020
eda4636
Update Links and Language to Git + VSCode (#522)
ethanchewy Jun 8, 2020
1aea046
Add substep for developer flow for clarity (#523)
ethanchewy Jun 8, 2020
5815819
Resolve action download info (#515)
ericsciple Jun 9, 2020
eaf39bb
add libicu66 for Ubuntu 20.04 (#535)
TingluoHuang Jun 11, 2020
312c766
Fix DataContract with Token service (#532)
TingluoHuang Jun 11, 2020
2e800f8
Skip search $PATH on command with fully qualified path (#526)
TingluoHuang Jun 11, 2020
de4490d
Restore SELinux context on service file when SELinux is enabled (#525)
TingluoHuang Jun 11, 2020
e728b85
fix race condition. (#538)
TingluoHuang Jun 11, 2020
89d1418
Update exception message (#540)
lokesh755 Jun 11, 2020
4e7d27a
remove temporary logic when resolving action download info (#550)
ericsciple Jun 15, 2020
df7e169
print runner and machine name to log. (#539)
TingluoHuang Jun 23, 2020
7cef9a2
release 2.267.0 runner.
TingluoHuang Jun 23, 2020
a0942ed
Composite Actions Support for Multiple Run Steps (#549)
ethanchewy Jun 23, 2020
121deed
Fix trailing '.0' for Int64 values (#572)
ericsciple Jun 30, 2020
d42c9da
Composite Actions: Support Env Flow (#557)
ethanchewy Jul 8, 2020
5822a38
Add bash command for running custom runner (#569)
ethanchewy Jul 8, 2020
9d7bd47
Improve Error Messaging for Actions by Using ExecutionContext's FileT…
ethanchewy Jul 8, 2020
6c3958f
Composite Run Steps ADR (#554)
ethanchewy Jul 13, 2020
cb2b323
Composite Run Steps Outputs (#568)
ethanchewy Jul 13, 2020
5e0cde8
Composite Actions UI (#578)
ethanchewy Jul 13, 2020
a711bd9
add `workflow_dispatch`
TingluoHuang Jul 28, 2020
dcda342
use /usr/bin/env to find bash in scripts (#314)
mmahut Apr 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Runner CI

on:
workflow_dispatch:
push:
branches:
- master
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Code Scanning - Action"

on:
push:
schedule:
- cron: '0 0 * * 0'

jobs:
CodeQL-Build:

strategy:
fail-fast: false


# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

- name: Manual build
run : |
./dev.sh layout Release linux-x64
working-directory: src

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
62 changes: 62 additions & 0 deletions docs/adrs/0274-step-outcome-and-conclusion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# ADR 0274: Step outcome and conclusion

**Date**: 2020-01-13

**Status**: Accepted

## Context

This ADR proposes adding `steps.<id>.outcome` and `steps.<id>.conclusion` to the steps context.

This allows downstream a step to run based on whether a previous step succeeded or failed.

Reminder, currently the steps contains `steps.<id>.outputs`.

## Decision

For steps that have completed, populate `steps.<id>.outcome` and `steps.<id>.conclusion` with one of the following values:

- `success`
- `failure`
- `cancelled`
- `skipped`

When a continue-on-error step fails, the outcome will be `failure` even though the final conclusion is `success`.

### Example

```yaml
steps:

- id: experimental
continue-on-error: true
run: ./build.sh experimental

- if: ${{ steps.experimental.outcome == 'success' }}
run: ./publish.sh experimental
```

### Terminology

The runs API uses the term `conclusion`.

Therefore we use a different term `outcome` for the value prior to continue-on-error.

The following is a snippet from the runs API response payload:

```json
"steps": [
{
"name": "Set up job",
"status": "completed",
"conclusion": "success",
"number": 1,
"started_at": "2020-01-09T11:06:16.000-05:00",
"completed_at": "2020-01-09T11:06:18.000-05:00"
},
```

## Consequences

- Update runner
- Update [docs](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#steps-context)
75 changes: 75 additions & 0 deletions docs/adrs/0361-wrapper-action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# ADR 361: Wrapper Action

**Date**: 2020-03-06

**Status**: Pending

## Context

In addition to action's regular execution, action author may wants their action has a chance to participate in:
- Job initialize
My Action will collect machine resource usage (CPU/RAM/Disk) during a workflow job execution, we need to start perf recorder at the begin of the job.
- Job cleanup
My Action will dirty local workspace or machine environment during execution, we need to cleanup these changes at the end of the job.
Ex: `actions/checkout@v2` will write `github.token` into local `.git/config` during execution, it has post job cleanup defined to undo the changes.

## Decision

### Add `pre` and `post` execution to action

Node Action Example:

```yaml
name: 'My action with pre'
description: 'My action with pre'
runs:
using: 'node12'
pre: 'setup.js'
pre-if: 'success()' // Optional
main: 'index.js'
post: 'cleanup.js'
post-if: 'success()' // Optional
```

Container Action Example:

```yaml
name: 'My action with pre'
description: 'My action with pre'
runs:
using: 'docker'
image: 'mycontainer:latest'
pre-entrypoint: 'setup.sh'
pre-if: 'success()' // Optional
entrypoint: 'entrypoint.sh'
post-entrypoint: 'cleanup.sh'
post-if: 'success()' // Optional
```

Both `pre` and `post` will has default `pre-if/post-if` sets to `always()`.
Setting `pre` to `always()` will make sure no matter what condition evaluate result the `main` gets at runtime, the `pre` has always run already.
`pre` executes in order of how the steps are defined.
`pre` will always be added to job steps list during job setup.
> Action referenced from local repository (`./my-action`) won't get `pre` setup correctly since the repository haven't checkout during job initialize.
> We can't use GitHub api to download the repository since there is a about 3 mins delay between `git push` and the new commit available to download using GitHub api.

`post` will be pushed into a `poststeps` stack lazily when the action's `pre` or `main` execution passed `if` condition check and about to run, you can't have an action that only contains a `post`, we will pop and run each `post` after all `pre` and `main` finished.
> Currently `post` works for both repository action (`org/repo@v1`) and local action (`./my-action`)

Valid action:
- only has `main`
- has `pre` and `main`
- has `main` and `post`
- has `pre`, `main` and `post`

Invalid action:
- only has `pre`
- only has `post`
- has `pre` and `post`

Potential downside of introducing `pre`:

- Extra magic wrt step order. Users should control the step order. Especially when we introduce templates.
- Eliminates the possibility to lazily download the action tarball, since `pre` always run by default, we have to download the tarball to check whether action defined a `pre`
- `pre` doesn't work with local action, we suggested customer use local action for testing their action changes, ex CI for their action, to avoid delay between `git push` and GitHub repo tarball download api.
- Condition on the `pre` can't be controlled using dynamic step outputs. `pre` executes too early.
56 changes: 56 additions & 0 deletions docs/adrs/0397-runner-registration-labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# ADR 0397: Support adding custom labels during runner config
**Date**: 2020-03-30

**Status**: Approved

## Context

Since configuring self-hosted runners is commonly automated via scripts, the labels need to be able to be created during configuration. The runner currently registers the built-in labels (os, arch) during registration but does not accept labels via command line args to extend the set registered.

See Issue: https://github.com/actions/runner/issues/262

This is another version of [ADR275](https://github.com/actions/runner/pull/275)

## Decision

This ADR proposes that we add a `--labels` option to `config`, which could be used to add custom additional labels to the configured runner.

For example, to add a single extra label the operator could run:
```bash
./config.sh --labels mylabel
```
> Note: the current runner command line parsing and envvar override algorithm only supports a single argument (key).

This would add the label `mylabel` to the runner, and enable users to select the runner in their workflow using this label:
```yaml
runs-on: [self-hosted, mylabel]
```

To add multiple labels the operator could run:
```bash
./config.sh --labels mylabel,anotherlabel
```
> Note: the current runner command line parsing and envvar override algorithm only supports a single argument (key).

This would add the label `mylabel` and `anotherlabel` to the runner, and enable users to select the runner in their workflow using this label:
```yaml
runs-on: [self-hosted, mylabel, anotherlabel]
```

It would not be possible to remove labels from an existing runner using `config.sh`, instead labels would have to be removed using the GitHub UI.

The labels argument will split on commas, trim and discard empty strings. That effectively means don't use commans in unattended config label names. Alternatively we could choose to escape commans but it's a nice to have.

## Replace

If an existing runner exists and the option to replace is chosen (interactively of via unattend as in this scenario), then the labels will be replaced / overwritten (not merged).

## Overriding built-in labels

Note that it is possible to register "built-in" hosted labels like `ubuntu-latest` and is not considered an error. This is an effective way for the org / runner admin to dictate by policy through registration that this set of runners will be used without having to edit all the workflow files now and in the future.

We will also not make other restrictions such as limiting explicitly adding os / arch labels and validating. We will assume that explicit labels were added for a reason and not restricting offers the most flexibility and future proofing / compat.

## Consequences

The ability to add custom labels to a self-hosted runner would enable most scenarios where job runner selection based on runner capabilities or characteristics are required.
Loading