Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
d3803e6
Bump Golang to 1.15
vania-pooh Aug 16, 2020
e77894c
Merge pull request #970 from vania-pooh/master
vania-pooh Aug 16, 2020
7b1f19c
Bump Alpine version to 3.12
vania-pooh Aug 16, 2020
34b9994
Merge pull request #971 from vania-pooh/master
vania-pooh Aug 16, 2020
c3795a6
Added new images for Chrome 85.0 and Opera 70.0
vania-pooh Aug 29, 2020
44fb88b
Merge pull request #978 from vania-pooh/master
vania-pooh Aug 29, 2020
4a197bf
Added new images for Firefox 80.0
vania-pooh Sep 2, 2020
98f4957
Merge pull request #981 from vania-pooh/master
vania-pooh Sep 2, 2020
a5d4384
Updated Android images to recent emulator and Appium version
vania-pooh Sep 21, 2020
6705917
Merge pull request #991 from vania-pooh/master
vania-pooh Sep 21, 2020
53987d7
Moved browser image information to separate documentation
vania-pooh Sep 26, 2020
a6461fa
Merge pull request #994 from vania-pooh/master
vania-pooh Sep 26, 2020
7e26f70
Removed CM bash script from Selenoid documentation
vania-pooh Sep 27, 2020
f838c2a
Merge pull request #995 from vania-pooh/master
vania-pooh Sep 27, 2020
30fc1a5
Handle http errors before changing queue stats (fixes #998)
Koilanetroc Oct 1, 2020
3790f7f
Merge pull request #999 from Koilanetroc/fix_998
vania-pooh Oct 2, 2020
e1c4a1a
Replaced set-env instruction in Github Actions with safer one
vania-pooh Nov 19, 2020
fe95195
Merge pull request #1019 from vania-pooh/master
vania-pooh Nov 19, 2020
e89b7ab
Add Started to session data from /status (#1031)
nebehr Dec 9, 2020
b12baec
Timeout and capability fixes (fixes #867, fixes #916)
vania-pooh Mar 17, 2021
6cb28fe
Bump Golang to 1.16 (fixes #1072)
vania-pooh Mar 17, 2021
40e2aea
Running Selenoid container from non-root user (fixes #1060)
vania-pooh Mar 17, 2021
69405ae
Completely removed `pwd` from documentation (fixes #1073)
vania-pooh Mar 17, 2021
b60fc21
Merge pull request #1074 from vania-pooh/master
aandryashin Mar 23, 2021
eebc4bb
Reverted Dockerfile USER change
vania-pooh Mar 24, 2021
a6ae0c7
Merge pull request #1076 from vania-pooh/master
vania-pooh Mar 24, 2021
bc819b4
Removing only selenoid:options and preserving stuff like goog:chromeO…
vania-pooh Mar 26, 2021
c6ca859
Merge pull request #1078 from vania-pooh/master
aandryashin Mar 26, 2021
b15a59f
Added riadvice logo to README.md
vania-pooh Apr 16, 2021
68ce8aa
Merge pull request #1091 from vania-pooh/master
vania-pooh Apr 16, 2021
c509785
Added documentation about deleting downloaded files (related to #533)
vania-pooh Apr 25, 2021
bf5d548
Merge pull request #1095 from vania-pooh/master
vania-pooh Apr 25, 2021
a4aeddf
Fix broken command in documentation
platonoff-dev May 2, 2021
ba89d3d
Fix review notes
platonoff-dev May 2, 2021
71c6537
Merge pull request #1101 from p4m-dev/patch-1
vania-pooh May 3, 2021
ebba617
Completely removed vnc: images from documentation
vania-pooh May 21, 2021
1939bba
Setting Host header to localhost (needed for recent Safari driver)
vania-pooh May 21, 2021
e6523b6
Merge pull request #1106 from vania-pooh/master
vania-pooh May 21, 2021
027b183
Prevent unwanted timeout function call
Jun 23, 2021
b97e406
Propagate Content-Type header if client sends it
georgy Jul 22, 2021
2ca42dd
Merge pull request #1123 from georgy/propagate-content-type
vania-pooh Jul 22, 2021
3223dcc
Setting Host header to localhost when creating session too (related t…
vania-pooh Jul 29, 2021
1042058
Merge pull request #1128 from vania-pooh/master
vania-pooh Jul 29, 2021
80c1979
Added note about sudo to quick-start-guide
vania-pooh Aug 31, 2021
009e498
Merge pull request #1138 from vania-pooh/master
aandryashin Aug 31, 2021
f601da3
Merge pull request #1113 from pavelsmolensky/master
vania-pooh Sep 6, 2021
6131e8a
Bump Golang to 1.17.0
vania-pooh Sep 6, 2021
389ab02
Merge pull request #1140 from vania-pooh/master
vania-pooh Sep 6, 2021
d6fc603
Fixed file upload.
aandryashin Nov 5, 2021
069df4a
Merge pull request #1152 from aandryashin/master
vania-pooh Nov 5, 2021
dd5f257
Automatically building binary for arm64 arch
vania-pooh Nov 15, 2021
124ae88
Merge pull request #1154 from vania-pooh/master
vania-pooh Nov 15, 2021
0466991
Switched to w3c standard compatible errors (fixes #1143)
vania-pooh Nov 19, 2021
a20a4a8
Merge pull request #1155 from vania-pooh/master
vania-pooh Nov 19, 2021
ef07133
Run `go fmt ./...` and `go mod tidy -go=1.17`
Juneezee Nov 20, 2021
417f0d1
Move from io/ioutil to io and os packages
Juneezee Nov 20, 2021
57c9044
Merge pull request #1156 from Juneezee/deprecate-ioutil
vania-pooh Nov 20, 2021
20a5115
/clipboard and /download are available as protocol extension commands…
vania-pooh Nov 20, 2021
65ea85c
Merge pull request #1157 from vania-pooh/master
vania-pooh Nov 20, 2021
eb00b6c
Bump Golang to 1.18
vania-pooh Apr 19, 2022
e2f1f18
Merge pull request #1209 from vania-pooh/master
vania-pooh Apr 19, 2022
4875704
Not pushing to aandryashin/selenoid
vania-pooh Apr 19, 2022
d781a9d
Fixed old-school documentation URL
vania-pooh Apr 19, 2022
a5dcd2d
Merge pull request #1210 from vania-pooh/master
vania-pooh Apr 19, 2022
7e4f46e
Building a binary for arm64 (related to #1107)
vania-pooh Jun 15, 2022
8c06ce1
Merge pull request #1230 from vania-pooh/master
vania-pooh Jun 15, 2022
d11e601
Removed cloud platforms section from docs
vania-pooh Jun 15, 2022
fa38d33
Updated dependencies
vania-pooh Jun 16, 2022
df15055
Merge pull request #1231 from vania-pooh/master
vania-pooh Jun 16, 2022
e2587b9
Using host and port in Host header in container mode (related to #1193)
vania-pooh Jun 24, 2022
cddd7c0
Merge pull request #1235 from vania-pooh/master
vania-pooh Jun 25, 2022
3c49924
Automatically building image for linux/arm64 (related to #1107)
vania-pooh Jun 25, 2022
bdf38bd
Merge pull request #1236 from vania-pooh/master
vania-pooh Jun 25, 2022
b653c8b
Explicitly declaring TARGETARCH variable
vania-pooh Jun 25, 2022
50d64c3
Merge pull request #1237 from vania-pooh/master
vania-pooh Jun 25, 2022
c4b02dc
Building all binaries with CGO_ENABLED=0
vania-pooh Jun 29, 2022
a974004
Merge pull request #1242 from vania-pooh/master
vania-pooh Jun 29, 2022
8a0f80a
Sending correct Host header in drivers mode too
vania-pooh Jul 1, 2022
fbf82d8
Merge pull request #1244 from vania-pooh/master
vania-pooh Jul 1, 2022
957d188
Bump Golang to 1.19
vania-pooh Nov 15, 2022
6678bf3
Updated AWS client version
vania-pooh Nov 15, 2022
6d8e4ee
Merge pull request #1280 from vania-pooh/master
vania-pooh Nov 15, 2022
60bc1a6
Added govulncheck to CI
vania-pooh Nov 15, 2022
df4446e
Merge pull request #1281 from vania-pooh/master
vania-pooh Nov 15, 2022
e3e31bc
Use the appium:deviceName capability to find the specific browser as …
BorisOsipov Feb 3, 2023
1176ec6
Merge pull request #1305 from BorisOsipov/fix_appium_device_name
vania-pooh Feb 4, 2023
ab995bf
Golang 1.20 and fresh CI action versions
vania-pooh Feb 6, 2023
7697bbc
Merge pull request #1307 from vania-pooh/master
vania-pooh Feb 6, 2023
1769da0
Using more recent Docker client version (related to #1306)
vania-pooh Feb 9, 2023
ecf4cc2
Merge pull request #1309 from vania-pooh/master
vania-pooh Feb 9, 2023
c95b618
Bump golang.org/x/net from 0.5.0 to 0.7.0
dependabot[bot] Feb 18, 2023
2544fa5
Merge pull request #1313 from aerokube/dependabot/go_modules/golang.o…
vania-pooh Feb 20, 2023
bbe4a19
Bump Golang to 1.20.3
vania-pooh Apr 11, 2023
67eb972
Use default container hostname instead of localhost (fixes #1329)
vania-pooh Apr 11, 2023
e0cfe2f
Merge pull request #1330 from vania-pooh/master
vania-pooh Apr 11, 2023
1e356f7
Bump github.com/docker/distribution
dependabot[bot] May 11, 2023
f2f3347
Merge pull request #1337 from aerokube/dependabot/go_modules/github.c…
vania-pooh May 12, 2023
364aa9b
Updated Docker client to 1.43 (related to #1340)
vania-pooh May 21, 2023
ba5bcd7
Merge pull request #1341 from vania-pooh/master
vania-pooh May 21, 2023
4070cfc
Fixed contributing guide
vania-pooh May 25, 2023
aa110f4
Merge pull request #1348 from vania-pooh/master
vania-pooh May 25, 2023
a057cf9
feat: support "se:cdp" capability
DudaGod Jun 19, 2023
f0f19ce
Merge pull request #1354 from DudaGod/feat.add_se_cdp_capability
vania-pooh Jun 20, 2023
68dd34e
fix: correctly parse sessionId for chrome less 75
DudaGod Jul 13, 2023
e18077a
test: up go to 1.20.6 to fix vulnerabilities
DudaGod Jul 13, 2023
e83931c
Merge pull request #1361 from DudaGod/fix.parse_session_id_chrome_les…
vania-pooh Jul 14, 2023
8725d7f
Bump Golang to 1.20.7
vania-pooh Aug 7, 2023
3d94193
Merge pull request #1365 from vania-pooh/master
vania-pooh Aug 7, 2023
b7c1329
fix: address typo
testwill Sep 20, 2023
89ea1c0
Merge pull request #1375 from testwill/typo
vania-pooh Sep 20, 2023
f3e9ebc
Bump golang.org/x/net from 0.10.0 to 0.17.0
dependabot[bot] Oct 11, 2023
dbedf71
Bump Golang to 1.21.3
vania-pooh Oct 14, 2023
757151a
Merge pull request #1378 from aerokube/dependabot/go_modules/golang.o…
vania-pooh Oct 14, 2023
a348ae0
Bump github.com/docker/docker
dependabot[bot] Oct 30, 2023
61b6e99
Merge pull request #1381 from aerokube/dependabot/go_modules/github.c…
vania-pooh Nov 2, 2023
2b0fa87
Added stale.yml to close outdated issues
vania-pooh Dec 31, 2023
675a1fa
Bump Golang to 1.21.5
vania-pooh Dec 31, 2023
4015eda
Using github.com/stretchr/testify for tests
vania-pooh Dec 31, 2023
abb7f88
Merge pull request #1389 from vania-pooh/master
vania-pooh Dec 31, 2023
7d916ad
Migrated state.yml to Github Action
vania-pooh Jan 7, 2024
be31259
Merge pull request #1392 from vania-pooh/master
vania-pooh Jan 7, 2024
841ca2e
Replace `github.com/pborman/uuid` with `github.com/google/uuid`
Juneezee Jan 7, 2024
b9a727e
Merge pull request #1393 from Juneezee/remove-extra-uuid-dep
vania-pooh Jan 8, 2024
849d14f
Fixed syntax in stale job
vania-pooh Jan 9, 2024
079fe2d
Merge pull request #1394 from vania-pooh/master
vania-pooh Jan 9, 2024
8029d65
Bump Goland to 1.21.6
vania-pooh Jan 24, 2024
6363e98
Updated Docker client and other dependencies (fixes #1397)
vania-pooh Jan 25, 2024
fd32287
Merge pull request #1398 from vania-pooh/master
vania-pooh Jan 25, 2024
61491c4
Added se:cdpVersion to returned capabilities (related to #1405)
vania-pooh Feb 28, 2024
350e6c8
Bump Golang to 1.22
vania-pooh Feb 28, 2024
2538009
Merge pull request #1408 from vania-pooh/master
vania-pooh Feb 28, 2024
c862585
Bump github.com/docker/docker
dependabot[bot] Mar 20, 2024
c6895b7
Merge pull request #1413 from aerokube/dependabot/go_modules/github.c…
vania-pooh Mar 22, 2024
ab72a8e
Bump golang.org/x/net from 0.20.0 to 0.23.0
dependabot[bot] Apr 19, 2024
8ff53e0
Merge pull request #1418 from aerokube/dependabot/go_modules/golang.o…
vania-pooh Apr 23, 2024
b71405f
Bump Golang to 1.22.3
vania-pooh May 20, 2024
b66f000
Bump Docker client to support API 1.45 (fixes #1420)
vania-pooh May 20, 2024
773c202
Merge pull request #1424 from vania-pooh/master
vania-pooh May 20, 2024
e498f9b
VNC RedHat doc
ZazaKumar May 22, 2024
7b5cecf
Merge pull request #1425 from ZazaKumar/pr-20240522
vania-pooh May 25, 2024
99d4332
Bump Golang to 1.22.5
vania-pooh Jul 21, 2024
7dfde13
Merge pull request #1431 from vania-pooh/master
vania-pooh Jul 21, 2024
9bb9f6d
Bump github.com/docker/docker
dependabot[bot] Jul 30, 2024
fa04a31
Merge pull request #1432 from aerokube/dependabot/go_modules/github.c…
vania-pooh Jul 31, 2024
9ad136b
Bump github.com/docker/docker
dependabot[bot] Aug 9, 2024
c03e8d1
Merge pull request #1434 from aerokube/dependabot/go_modules/github.c…
vania-pooh Aug 10, 2024
fa2c794
Update README.md
aandryashin Dec 17, 2024
d496072
Merge pull request #1446 from aerokube/aandryashin-patch-1
aandryashin Dec 17, 2024
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
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,23 @@ jobs:
golang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Golang
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.14.x
go-version: ~1.22.5

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Test
run: ci/test.sh

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,31 @@ jobs:
golang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Golang
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.14.x
go-version: ~1.22.5

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Test
run: ci/test.sh

- name: Build
run: ci/build.sh

- name: Prepare release version
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10}
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV

- uses: AButler/upload-release-assets@v2.0
with:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
days-before-stale: 60
days-before-close: 7
stale-issue-label: stale
exempt-issue-labels: new-feature,bug,improvement,docs
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
golang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Golang
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.14.x
go-version: ~1.22.5

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -27,6 +27,6 @@ jobs:
- name: Build
run: ci/build.sh

- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v3
with:
flags: go
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM alpine:3.8
FROM --platform=$BUILDPLATFORM alpine:3

RUN apk add -U ca-certificates tzdata mailcap && rm -Rf /var/cache/apk/*
COPY selenoid /usr/bin

ARG TARGETARCH
COPY dist/selenoid_linux_$TARGETARCH /usr/bin/selenoid

EXPOSE 4444
ENTRYPOINT ["/usr/bin/selenoid", "-listen", ":4444", "-conf", "/etc/selenoid/browsers.json", "-video-output-dir", "/opt/selenoid/video/"]
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/aerokube/selenoid.svg)](https://hub.docker.com/r/aerokube/selenoid)
[![StackOverflow Tag](https://img.shields.io/badge/stackoverflow-selenoid-orange.svg?style=flat)](https://stackoverflow.com/questions/tagged/selenoid)

**UNMAINTAINED**. Consider https://aerokube.com/moon/latest as alternative.

Selenoid is a powerful implementation of [Selenium](http://github.com/SeleniumHQ/selenium) hub using [Docker](https://docker.com/) containers to launch browsers.
![Selenoid Animation](docs/img/selenoid-animation.gif)

## Features

### One-command Installation
Start browser automation in minutes by copy-pasting just **one command**:
Start browser automation in minutes by downloading [Configuration Manager](https://github.com/aerokube/cm/releases) binary and running just **one command**:
```
$ curl -s https://aerokube.com/cm/bash | bash \
&& ./cm selenoid start --vnc --tmpfs 128
$ ./cm selenoid start --vnc --tmpfs 128
```
**That's it!** You can now use Selenoid instead of Selenium server. Specify the following Selenium URL in tests:
```
Expand Down Expand Up @@ -67,5 +68,5 @@ Selenoid was initially created to be deployed on hardware servers or virtual mac

## Known Users

[![JetBrains](docs/img/logo/jetbrains.png)](http://jetbrains.com/) [![Yandex](docs/img/logo/yandex.png)](https://yandex.com/company/) [![Sberbank Technology](docs/img/logo/sbertech.png)](http://sber-tech.com/) [![ThoughtWorks](docs/img/logo/thoughtworks.png)](https://thoughtworks.com/) [![VK.com](docs/img/logo/vk.png)](https://vk.com/) [![SuperJob](docs/img/logo/superjob.png)](http://superjob.ru/) [![PropellerAds](docs/img/logo/propellerads.png)](http://propellerads.com/) [![AlfaBank](docs/img/logo/alfabank.png)](https://alfabank.com/) [![3CX](docs/img/logo/3cx.png)](https://www.3cx.com/) [![IQ Option](docs/img/logo/iq_option.png)](https://iqoption.com/) [![Mail.Ru Group](docs/img/logo/mail_ru.png)](https://corp.mail.ru/en/) [![Newegg.Com](docs/img/logo/newegg.png)](https://newegg.com/) [![Badoo](docs/img/logo/badoo.png)](https://badoo.com/team/) [![BCS](docs/img/logo/bcs.png)](https://bcs.ru/) [![Quality Lab](docs/img/logo/quality-lab.png)](https://quality-lab.ru) [![AT Consulting](docs/img/logo/at-consulting.png)](https://www.at-consulting.ru/) [![Royal Caribbean International](docs/img/logo/royal-caribbean.png)](https://www.royalcaribbean.com/) [![Sixt](docs/img/logo/sixt.png)](https://sixt.com/) [![Testjar](docs/img/logo/testjar.png)](http://www.testjar.com/) [![Flipdish](docs/img/logo/flipdish.png)](https://www.flipdish.com/)
[![JetBrains](docs/img/logo/jetbrains.png)](http://jetbrains.com/) [![Yandex](docs/img/logo/yandex.png)](https://yandex.com/company/) [![Sberbank Technology](docs/img/logo/sbertech.png)](http://sber-tech.com/) [![ThoughtWorks](docs/img/logo/thoughtworks.png)](https://thoughtworks.com/) [![VK.com](docs/img/logo/vk.png)](https://vk.com/) [![SuperJob](docs/img/logo/superjob.png)](http://superjob.ru/) [![PropellerAds](docs/img/logo/propellerads.png)](http://propellerads.com/) [![AlfaBank](docs/img/logo/alfabank.png)](https://alfabank.com/) [![3CX](docs/img/logo/3cx.png)](https://www.3cx.com/) [![IQ Option](docs/img/logo/iq_option.png)](https://iqoption.com/) [![Mail.Ru Group](docs/img/logo/mail_ru.png)](https://corp.mail.ru/en/) [![Newegg.Com](docs/img/logo/newegg.png)](https://newegg.com/) [![Badoo](docs/img/logo/badoo.png)](https://badoo.com/team/) [![BCS](docs/img/logo/bcs.png)](https://bcs.ru/) [![Quality Lab](docs/img/logo/quality-lab.png)](https://quality-lab.ru) [![AT Consulting](docs/img/logo/at-consulting.png)](https://www.at-consulting.ru/) [![Royal Caribbean International](docs/img/logo/royal-caribbean.png)](https://www.royalcaribbean.com/) [![Sixt](docs/img/logo/sixt.png)](https://sixt.com/) [![Testjar](docs/img/logo/testjar.png)](http://www.testjar.com/) [![Flipdish](docs/img/logo/flipdish.png)](https://www.flipdish.com/) [![RiAdvice](docs/img/logo/riadvice.png)](https://riadvice.tn/)

7 changes: 4 additions & 3 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e

export GO111MODULE="on"
go get -u github.com/mitchellh/gox # cross compile
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD` -s -w"
gox -os "linux darwin windows" -arch "amd64" -osarch="windows/386" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD` -s -w"
go install github.com/mitchellh/gox@latest # cross compile
CGO_ENABLED=0 gox -os "linux darwin windows" -arch "amd64" -osarch="darwin/arm64" -osarch="darwin/arm64" -osarch="linux/arm64" -osarch="windows/386" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD` -s -w"
9 changes: 1 addition & 8 deletions ci/docker-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,5 @@

set -e

docker build -t $GITHUB_REPOSITORY .
docker tag $GITHUB_REPOSITORY $GITHUB_REPOSITORY:$1
docker tag $GITHUB_REPOSITORY selenoid/hub:$1
docker tag $GITHUB_REPOSITORY aandryashin/selenoid:$1
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
docker push $GITHUB_REPOSITORY
docker push $GITHUB_REPOSITORY:$1
docker push selenoid/hub:$1
docker push aandryashin/selenoid:$1
docker buildx build --pull --push -t "$GITHUB_REPOSITORY" -t "$GITHUB_REPOSITORY:$1" -t "selenoid/hub:$1" --platform linux/amd64,linux/arm64 .
7 changes: 6 additions & 1 deletion ci/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash

set -e

export GO111MODULE="on"
go test -tags 's3 metadata' -v -race -coverprofile=coverage.txt -covermode=atomic -coverpkg github.com/aerokube/selenoid,github.com/aerokube/selenoid/session,github.com/aerokube/selenoid/config,github.com/aerokube/selenoid/protect,github.com/aerokube/selenoid/service,github.com/aerokube/selenoid/upload
go test -tags 's3 metadata' -v -race -coverprofile=coverage.txt -covermode=atomic -coverpkg github.com/aerokube/selenoid,github.com/aerokube/selenoid/session,github.com/aerokube/selenoid/config,github.com/aerokube/selenoid/protect,github.com/aerokube/selenoid/service,github.com/aerokube/selenoid/upload,github.com/aerokube/selenoid/info,github.com/aerokube/selenoid/jsonerror

go install golang.org/x/vuln/cmd/govulncheck@latest
"$(go env GOPATH)"/bin/govulncheck -tags production ./...
11 changes: 6 additions & 5 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package config

import (
"log"

"encoding/json"
"fmt"
"io/ioutil"
"log"
"os"
"strings"
"sync"
"time"

"github.com/aerokube/selenoid/session"
"github.com/docker/docker/api/types/container"
"time"
)

// Session - session id and vnc flag
Expand All @@ -22,6 +21,7 @@ type Session struct {
VNC bool `json:"vnc"`
Screen string `json:"screen"`
Caps session.Caps `json:"caps"`
Started time.Time `json:"started"`
}

// Sessions - used count and individual sessions for quota user
Expand Down Expand Up @@ -85,7 +85,7 @@ func NewConfig() *Config {
}

func loadJSON(filename string, v interface{}) error {
buf, err := ioutil.ReadFile(filename)
buf, err := os.ReadFile(filename)
if err != nil {
return fmt.Errorf("read error: %v", err)
}
Expand Down Expand Up @@ -182,6 +182,7 @@ func (config *Config) State(sessions *session.Map, limit, queued, pending int) *
VNC: vnc,
Screen: session.Caps.ScreenResolution,
Caps: session.Caps,
Started: session.Started,
}
if ctr != nil {
sess.Container = ctr.ID
Expand Down
Loading