Skip to content

Commit 1f87bf2

Browse files
author
AlexRogalskiy
committed
Added info on workflows
Updates on github-actions
1 parent 819dbb6 commit 1f87bf2

25 files changed

+620
-37
lines changed

Tiltfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# -*- mode: Python -*
22

3+
# For more on Extensions, see: https://docs.tilt.dev/extensions.html
4+
load('ext://restart_process', 'docker_build_with_restart')
5+
36
k8s_yaml('kubernetes.yaml')
47
k8s_resource('example-java-patterns', port_forwards=8000, resource_deps=['deploy'])
58

@@ -8,13 +11,16 @@ k8s_resource('example-java-patterns', port_forwards=8000, resource_deps=['deploy
811
# shows you how to set up a custom workflow that measures it.
912
local_resource(
1013
'deploy',
11-
'npm --version > build.txt'
14+
'python3 ./record-start-time.py'
1215
)
1316

1417
# Add a live_update rule to our docker_build
1518
congrats = "🎉 Congrats, you ran a live_update! 🎉"
16-
docker_build('java-patterns', '.', build_args={'IMAGE_SOURCE': 'node', 'IMAGE_TAG': '12-buster'},
19+
docker_build_with_restart('java-patterns', '.', build_args={'IMAGE_SOURCE': 'node', 'IMAGE_TAG': '12-buster'},
20+
dockerfile='./Dockerfile',
21+
entrypoint=['mkdocs', 'serve', '--verbose', '--dirtyreload'],
1722
live_update=[
1823
sync('.', '/usr/src/app'),
24+
run('python3 ./record-start-time.py'),
1925
run('cd /usr/src/app/docs && pip3.8 install -r requirements.txt --quiet', trigger='./requirements.txt')
2026
])

build.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
7.18.1
1+
startTimeSecs = 1626901134;
2+
startTimeNanos = 979205369;

docs/patterns/snippet-template.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
| Name | Category | Description | Labels | Links |
2+
| ----------------- | :-------------------: | :-----------------: | :---------------------: | :-------: |
3+
| Snippet name | Snippet category | Snippet description | 'utility','intermediate'| <links> |
4+
5+
# Snippet Template
6+
7+
Explain briefly what the snippet does.
8+
9+
- Explain briefly how the snippet works.
10+
- Use bullet points for your snippet's explanation.
11+
- Try to explain everything briefly but clearly.
12+
13+
## Snippet samples
14+
15+
```java
16+
public interface Snippet {
17+
// snippets declaration
18+
}
19+
```
20+
21+
```java
22+
public class BaseSnippet implements Snippet {
23+
// snippets implementation
24+
}
25+
```

docs/patterns/snippet.template.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/reporting/bug_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
***
2-
3-
## Name: Bug report&#xD;&#xA;about: Create a report to help us improve&#xD;&#xA;title: ''&#xD;&#xA;labels: ''&#xD;&#xA;assignees: ''
1+
| Name | Category | Description | Labels | Links |
2+
| ----------------- | :-------------------: | :-----------------: | :---------------------: | :-------: |
3+
| Bug name | Bug category | Bug description | 'utility','intermediate'| <links> |
44

55
# Bug Report
66

docs/reporting/custom_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
***
2-
3-
## Name: Custom issue template&#xD;&#xA;about: Describe this issue template's purpose here.&#xD;&#xA;steps: ''&#xD;&#xA;labels: ''&#xD;&#xA;assignees: ''
1+
| Name | Category | Description | Labels | Links |
2+
| ----------------- | :-------------------: | :-----------------: | :---------------------: | :-------: |
3+
| Report name | Report category | Report description | 'utility','intermediate'| <links> |
44

55
# Custom Report
66

docs/reporting/feature_request_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
***
2-
3-
## Name: Feature request&#xD;&#xA;about: Suggest an idea for this project&#xD;&#xA;title: ''&#xD;&#xA;labels: ''&#xD;&#xA;assignees: ''
1+
| Name | Category | Description | Labels | Links |
2+
| ----------------- | :-------------------: | :-----------------: | :---------------------: | :-------: |
3+
| Feature name | Feature category | Feature description | 'utility','intermediate'| <links> |
44

55
# Feature Request Template
66

docs/reporting/issue_template.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
***
2-
3-
## Name: Issue report&#xD;&#xA;about: Create an issue report&#xD;&#xA;title: ''&#xD;&#xA;labels: ''&#xD;&#xA;assignees: ''
1+
| Name | Category | Description | Labels | Links |
2+
| ----------------- | :-------------------: | :-----------------: | :---------------------: | :-------: |
3+
| Issue name | Issue category | Issue description | 'utility','intermediate'| <links> |
44

55
# Issue Report
66

@@ -17,7 +17,7 @@
1717
- **Tool/Service/Component**: \[name, version] for example "PIT 1.2.0, Descartes 0.2-SNAPSHOT, PITMP 1.0.1""
1818
- **Execution Environment**: \[platform, OS, etc] Description of the execution environment, e.g "Linux
1919
OpenSuse Tumbleweed" or "Linux Ubuntu 16.04.1" including information about the version of the executed
20-
STAMP tools/services and their local dependencies (in case of standalone execution)
20+
STAMP tools/services, and their local dependencies (in case of standalone execution)
2121
- **Reporter**: \[name, mail] Reference information of the reporter, so the assignee can contact back for
2222
further issue refinement, if needed.
2323

record-start-time.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import re
2+
import time
3+
4+
filename = "build.txt"
5+
f = open(filename, "r")
6+
contents = f.read()
7+
f.close()
8+
9+
timestamp_sec = int(time.time())
10+
timestamp_nano = (float(time.time()) - timestamp_sec) * 1000 * 1000 * 1000
11+
contents = re.sub(r'startTimeSecs = .*;',
12+
"startTimeSecs = %d;" % timestamp_sec,
13+
contents)
14+
contents = re.sub(r'startTimeNanos = .*;',
15+
"startTimeNanos = %d;" % timestamp_nano,
16+
contents)
17+
18+
f = open(filename, "w")
19+
f.write(contents)
20+
f.close()

record-start-time.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
tmpfile=$(mktemp /tmp/tilt-example-java.XXXXXX)
6+
7+
cat build.txt |
8+
sed -e "s/startTimeSecs = .*;/startTimeSecs = $(date +%-s);/" |
9+
sed -e "s/startTimeNanos = .*;/startTimeNanos = $(date +%-N);/" >$tmpfile
10+
11+
mv $tmpfile build.txt

0 commit comments

Comments
 (0)