Porównaj commity

..

151 Commity

Autor SHA1 Wiadomość Data
Mi Klo 8900ad3ed4 fork and upgrade base image to ubuntu:jammy 22.04 LTS 2023-08-06 01:48:16 +00:00
LinuxServer-CI 6db0c2fa7f Bot Updating Package Versions 2022-09-20 05:01:58 -05:00
LinuxServer-CI 87156aee9e Bot Updating Templated Files 2022-09-20 04:57:36 -05:00
LinuxServer-CI 10b21dc0bc Bot Updating Package Versions 2022-09-06 11:54:25 +02:00
LinuxServer-CI 29c6d241ec Bot Updating Package Versions 2022-07-19 11:53:13 +02:00
LinuxServer-CI bbf013c622 Bot Updating Package Versions 2022-07-12 11:53:12 +02:00
Adam fd8606a3c8
Merge pull request #9 from linuxserver/deprecate-master 2022-06-29 19:28:03 +01:00
LinuxServer-CI efb984187a Bot Updating Package Versions 2022-06-28 04:52:22 -05:00
TheSpad 0ec7809989
Run builder 2022-06-23 18:48:52 +01:00
TheSpad 2bc9122f49
Deprecate master 2022-06-23 18:44:59 +01:00
LinuxServer-CI 4757a2bf4a Bot Updating Package Versions 2022-06-14 04:52:46 -05:00
LinuxServer-CI 7ab0d01eaa Bot Updating Package Versions 2022-05-31 11:53:36 +02:00
LinuxServer-CI cf7aa43b43 Bot Updating Package Versions 2022-05-24 04:53:31 -05:00
LinuxServer-CI f84ce60885 Bot Updating Package Versions 2022-05-17 11:52:59 +02:00
LinuxServer-CI 8402b6bce6 Bot Updating Package Versions 2022-05-10 04:52:47 -05:00
LinuxServer-CI a1d4a5eaec Bot Updating Package Versions 2022-05-03 04:52:26 -05:00
LinuxServer-CI 5a32cd49da Bot Updating Package Versions 2022-04-19 04:52:39 -05:00
LinuxServer-CI 53e002783b Bot Updating Package Versions 2022-04-12 04:52:09 -05:00
LinuxServer-CI 74fe0bbcdf Bot Updating Package Versions 2022-03-29 11:52:20 +02:00
LinuxServer-CI 19e55b8491 Bot Updating Package Versions 2022-03-22 10:52:38 +01:00
LinuxServer-CI 050e9a619c Bot Updating Package Versions 2022-03-15 10:52:32 +01:00
LinuxServer-CI 7b13446484 Bot Updating Package Versions 2022-03-08 10:52:22 +01:00
LinuxServer-CI 4b7cff90dc Bot Updating Package Versions 2022-03-01 10:52:03 +01:00
LinuxServer-CI 6521dabc35 Bot Updating Package Versions 2022-02-22 10:52:13 +01:00
LinuxServer-CI 02904a981a Bot Updating Package Versions 2022-02-01 10:52:02 +01:00
LinuxServer-CI 7459de91db Bot Updating Package Versions 2022-01-11 10:52:11 +01:00
LinuxServer-CI e89954851b Bot Updating Package Versions 2021-12-21 10:54:27 +01:00
LinuxServer-CI f93ef0b237 Bot Updating Templated Files 2021-12-21 10:51:07 +01:00
LinuxServer-CI ff55d2e0ee Bot Updating Package Versions 2021-12-14 10:53:06 +01:00
LinuxServer-CI 5eea93fdb7 Bot Updating Package Versions 2021-11-02 10:52:18 +01:00
LinuxServer-CI 945ab288bb Bot Updating Package Versions 2021-10-12 11:52:08 +02:00
LinuxServer-CI b4f26d77ff Bot Updating Templated Files 2021-10-05 11:51:06 +02:00
LinuxServer-CI 1ac8ff27aa Bot Updating Package Versions 2021-09-28 11:52:24 +02:00
LinuxServer-CI 5fcbd76c85 Bot Updating Package Versions 2021-09-21 11:52:04 +02:00
LinuxServer-CI 07a8c3f429 Bot Updating Package Versions 2021-09-14 11:52:09 +02:00
LinuxServer-CI 86ce4ec645 Bot Updating Package Versions 2021-08-31 11:54:53 +02:00
LinuxServer-CI 81a9f0fcc0 Bot Updating Templated Files 2021-08-31 11:51:14 +02:00
LinuxServer-CI 22b96a183b Bot Updating Package Versions 2021-08-17 11:53:45 +02:00
LinuxServer-CI dae7cf33a3 Bot Updating Package Versions 2021-08-03 11:53:26 +02:00
LinuxServer-CI f70d288640 Bot Updating Package Versions 2021-07-27 11:53:11 +02:00
LinuxServer-CI b6557a9c76 Bot Updating Package Versions 2021-07-20 11:53:27 +02:00
LinuxServer-CI ee220fed5d Bot Updating Package Versions 2021-07-06 09:57:26 +00:00
LinuxServer-CI 707837871d Bot Updating Templated Files 2021-07-06 09:53:02 +00:00
LinuxServer-CI a1669ef4ee Bot Updating Templated Files 2021-07-06 09:51:28 +00:00
LinuxServer-CI 5b92d7873a Bot Updating Package Versions 2021-06-29 10:08:35 +00:00
LinuxServer-CI 14c6c2c0cc Bot Updating Package Versions 2021-06-15 11:14:34 +01:00
LinuxServer-CI ac4cc69f9a Bot Updating Package Versions 2021-05-18 10:09:19 +00:00
LinuxServer-CI 79d243ad7a Bot Updating Package Versions 2021-04-20 06:17:06 -04:00
LinuxServer-CI bc122c4f14 Bot Updating Templated Files 2021-04-20 05:58:45 -04:00
LinuxServer-CI 94cc1f0985 Bot Updating Templated Files 2021-04-20 05:57:27 -04:00
LinuxServer-CI 3c37056dfb Bot Updating Package Versions 2021-04-13 06:07:28 -04:00
LinuxServer-CI 7b9cb356d5 Bot Updating Package Versions 2021-04-06 06:06:59 -04:00
LinuxServer-CI 1107c25571 Bot Updating Package Versions 2021-03-30 11:08:20 +01:00
LinuxServer-CI 742b75af08 Bot Updating Package Versions 2021-03-23 10:03:01 +00:00
LinuxServer-CI 32b2ce8720 Bot Updating Package Versions 2021-03-16 06:02:29 -04:00
LinuxServer-CI ef0511bf6e Bot Updating Package Versions 2021-03-09 10:05:21 +00:00
LinuxServer-CI 000edf302f Bot Updating Package Versions 2021-02-23 10:04:04 +00:00
LinuxServer-CI b3bcd794dd Bot Updating Templated Files 2021-02-16 09:54:21 +00:00
LinuxServer-CI 9980187a48 Bot Updating Templated Files 2021-02-16 09:53:06 +00:00
LinuxServer-CI 69b1c46c13 Bot Updating Package Versions 2021-02-09 10:06:26 +00:00
LinuxServer-CI a07576c429 Bot Updating Package Versions 2021-02-02 05:14:39 -05:00
LinuxServer-CI 367ae803be Bot Updating Package Versions 2021-01-26 05:06:27 -05:00
LinuxServer-CI 6693c02e9c Bot Updating Package Versions 2021-01-19 10:47:24 +00:00
LinuxServer-CI 79fbaf5552 Bot Updating Package Versions 2021-01-17 10:05:07 -05:00
LinuxServer-CI 25a333a288 Bot Updating Templated Files 2021-01-17 09:52:21 -05:00
LinuxServer-CI 7764d5dd4a Bot Updating Package Versions 2021-01-10 14:51:16 +00:00
LinuxServer-CI c4da19a1bb Bot Updating Package Versions 2020-12-20 14:42:53 +00:00
LinuxServer-CI ee9236b33c Bot Updating Templated Files 2020-12-20 14:34:29 +00:00
LinuxServer-CI 1967332c26 Bot Updating Templated Files 2020-12-20 14:33:04 +00:00
LinuxServer-CI 9a45938fe6 Bot Updating Package Versions 2020-12-13 14:38:17 +00:00
aptalca 74ef7608bf
Merge pull request #7 from linuxserver/master-wf
add trigger workflows
2020-12-02 20:14:21 -05:00
aptalca 855c8ceef4 add trigger workflows 2020-12-02 19:47:30 -05:00
LinuxServer-CI 43cc3d5582 Bot Updating Package Versions 2020-11-20 17:25:41 +00:00
LinuxServer-CI 54136a98c5 Bot Updating Package Versions 2020-11-13 17:21:58 +00:00
LinuxServer-CI fddd5cc4f1 Bot Updating Package Versions 2020-11-06 17:25:33 +00:00
LinuxServer-CI 55dc96aeda Bot Updating Package Versions 2020-11-01 22:17:20 -05:00
LinuxServer-CI c9954b09c8 Bot Updating Templated Files 2020-11-02 03:03:07 +00:00
thelamer ac0030b1ff update baseimages 2020-11-01 19:00:50 -08:00
LinuxServer-CI d295cd8606 Bot Updating Package Versions 2020-10-30 17:22:12 +00:00
LinuxServer-CI 2e175488a0 Bot Updating Templated Files 2020-10-09 12:16:12 -04:00
LinuxServer-CI 01ca4642e7 Bot Updating Templated Files 2020-10-09 16:15:03 +00:00
LinuxServer-CI 56beadb196 Bot Updating Package Versions 2020-09-25 16:21:10 +00:00
LinuxServer-CI 6955bca405 Bot Updating Package Versions 2020-09-18 12:18:19 -04:00
LinuxServer-CI cc273d1d9e Bot Updating Package Versions 2020-09-11 17:25:28 +01:00
LinuxServer-CI 541455f85a Bot Updating Package Versions 2020-08-21 12:19:13 -04:00
LinuxServer-CI 48dc1d5fec Bot Updating Templated Files 2020-08-21 12:14:47 -04:00
LinuxServer-CI 7d70d06709 Bot Updating Package Versions 2020-08-14 16:22:03 +00:00
LinuxServer-CI 5b7dc582a1 Bot Updating Templated Files 2020-08-07 16:16:04 +00:00
LinuxServer-CI 068ca9f1f2 Bot Updating Templated Files 2020-08-07 12:14:53 -04:00
LinuxServer-CI b22fbd7236 Bot Updating Package Versions 2020-07-31 16:19:58 +00:00
LinuxServer-CI 0c492bd64c Bot Updating Package Versions 2020-07-24 12:23:31 -04:00
LinuxServer-CI 0b317aaf68 Bot Updating Package Versions 2020-07-17 12:20:59 -04:00
LinuxServer-CI a1e570cb5f Bot Updating Package Versions 2020-07-10 16:22:41 +00:00
LinuxServer-CI f2b77d4305 Bot Updating Package Versions 2020-07-03 16:21:21 +00:00
LinuxServer-CI 2f7dabdbe2 Bot Updating Package Versions 2020-06-26 16:40:12 +00:00
LinuxServer-CI 95328a342c Bot Updating Package Versions 2020-06-12 12:20:57 -04:00
LinuxServer-CI fdf83bcde0 Bot Updating Package Versions 2020-06-05 12:21:05 -04:00
LinuxServer-CI a8339fa091 Bot Updating Package Versions 2020-05-29 12:39:58 -04:00
LinuxServer-CI 8232a9564f Bot Updating Templated Files 2020-05-29 12:14:48 -04:00
LinuxServer-CI 9a5ab43e1e Bot Updating Package Versions 2020-05-22 16:21:03 +00:00
LinuxServer-CI a54b8a5440 Bot Updating Package Versions 2020-05-15 12:21:38 -04:00
LinuxServer-CI eaeddbe1b8 Bot Updating Templated Files 2020-05-01 16:15:18 +00:00
LinuxServer-CI 80b09b2756 Bot Updating Package Versions 2020-04-24 16:44:49 +00:00
LinuxServer-CI 2fe103ab78 Bot Updating Package Versions 2020-04-17 11:35:12 -05:00
LinuxServer-CI bbeebd7e39 Bot Updating Package Versions 2020-04-10 12:35:29 -04:00
LinuxServer-CI 76d7a93ab3 Bot Updating Package Versions 2020-03-27 13:25:21 -04:00
LinuxServer-CI a33d1d2d97 Bot Updating Package Versions 2020-03-20 17:37:20 +00:00
LinuxServer-CI a63c934384 Bot Updating Package Versions 2020-03-13 18:46:02 +01:00
LinuxServer-CI 6838cfc98a Bot Updating Package Versions 2020-02-21 12:19:10 -05:00
LinuxServer-CI 76027b41fa Bot Updating Package Versions 2020-02-14 17:38:18 +00:00
aptalca 4d596f0bc5 support http auth 2020-02-07 13:48:42 -08:00
LinuxServer-CI 39c415e8ae Bot Updating Package Versions 2020-02-07 17:25:24 +00:00
LinuxServer-CI 5b9c2fc06d Bot Updating Package Versions 2020-01-31 17:32:44 +00:00
LinuxServer-CI fdb7eb29d5 Bot Updating Package Versions 2020-01-24 17:24:32 +00:00
LinuxServer-CI e6d0b4568e Bot Updating Package Versions 2020-01-17 12:19:40 -05:00
LinuxServer-CI 36b9329708 Bot Updating Package Versions 2019-12-13 18:38:03 +01:00
LinuxServer-CI 833974d4c8 Bot Updating Package Versions 2019-12-06 12:35:04 -05:00
LinuxServer-CI 2cd6dfe09d Bot Updating Templated Files 2019-11-27 17:42:29 -05:00
LinuxServer-CI e2c79315c6 Bot Updating Package Versions 2019-11-22 18:20:29 +01:00
LinuxServer-CI d21ab6a538 Bot Updating Package Versions 2019-11-01 13:35:33 -04:00
LinuxServer-CI 38bfe5a25c Bot Updating Templated Files 2019-11-01 13:14:50 -04:00
LinuxServer-CI 780225fd64 Bot Updating Package Versions 2019-10-18 17:38:57 +01:00
LinuxServer-CI 91fb2e092a Bot Updating Package Versions 2019-10-11 12:36:38 -04:00
LinuxServer-CI 822db9e4c2 Bot Updating Templated Files 2019-10-11 17:15:55 +01:00
LinuxServer-CI ead3503f05 Bot Updating Templated Files 2019-10-11 17:15:05 +01:00
LinuxServer-CI 7185b411bf Bot Updating Package Versions 2019-10-04 17:19:45 +01:00
LinuxServer-CI a68c229faa Bot Updating Package Versions 2019-09-20 17:20:07 +01:00
LinuxServer-CI f54e9d49c5 Bot Updating Package Versions 2019-09-13 12:33:22 -04:00
LinuxServer-CI 1b97d053da Bot Updating Package Versions 2019-09-06 12:39:01 -04:00
LinuxServer-CI 34a0ecaeb0 Bot Updating Templated Files 2019-09-06 12:17:10 -04:00
LinuxServer-CI 8f5da6b16f Bot Updating Templated Files 2019-09-06 12:15:33 -04:00
LinuxServer-CI 13c17c4222 Bot Updating Package Versions 2019-08-30 12:19:04 -04:00
LinuxServer-CI d12a76dfed Bot Updating Templated Files 2019-08-16 18:36:29 -04:00
aptalca a3cb850566 typo 2019-08-16 15:35:31 -07:00
LinuxServer-CI 3506f1f2b3 Bot Updating Package Versions 2019-08-08 17:22:52 +00:00
aptalca a947b31ad6
Merge pull request #3 from thelamer/master
adding zip and unzip
2019-08-08 13:01:48 -04:00
thelamer 741842ca34 adding zip and unzip 2019-08-08 09:39:45 -07:00
LinuxServer-CI 6b165e4e7e Bot Updating Package Versions 2019-08-02 18:35:17 +02:00
LinuxServer-CI 84394431dc Bot Updating Package Versions 2019-07-26 17:21:40 +01:00
LinuxServer-CI 2858623c03 Bot Updating Package Versions 2019-07-19 16:30:08 +00:00
LinuxServer-CI 1c6d735108 Bot Updating Package Versions 2019-07-12 18:28:59 +01:00
LinuxServer-CI 37800de766 Bot Updating Package Versions 2019-07-05 17:34:00 +01:00
LinuxServer-CI 95dc7f710a Bot Updating Package Versions 2019-06-28 16:33:14 +00:00
LinuxServer-CI 58fbe994b1 Bot Updating Package Versions 2019-06-21 16:33:49 +00:00
LinuxServer-CI aaf6df7a70 Bot Updating Package Versions 2019-06-14 16:20:15 +00:00
LinuxServer-CI afc3040c5b Bot Updating Package Versions 2019-06-07 18:20:44 +02:00
LinuxServer-CI 3a88bb56ab Bot Updating Templated Files 2019-06-04 02:03:31 +00:00
thelamer a5ba3704e8 need the home folder owned by abc 2019-06-03 19:01:47 -07:00
LinuxServer-CI 1cc8bb7898 Bot Updating Package Versions 2019-06-02 21:37:44 +00:00
chbmb 8f8ee89ac0
Merge pull request #1 from linuxserver/initial
Initial Version
2019-06-02 22:22:54 +01:00
thelamer 41860190ed change to pulling compiled bins from a tag for rebuilds and using an OS tag based on package versions 2019-05-27 11:23:06 -07:00
18 zmienionych plików z 159 dodań i 1396 usunięć

20
.editorconfig 100755
Wyświetl plik

@ -0,0 +1,20 @@
# This file is globally distributed to all container image projects from
# https://github.com/linuxserver/docker-jenkins-builder/blob/master/.editorconfig
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# trim_trailing_whitespace may cause unintended issues and should not be globally set true
trim_trailing_whitespace = false
[{Dockerfile*,**.yml}]
indent_style = space
indent_size = 2
[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}]
indent_style = space
indent_size = 4

Wyświetl plik

@ -1,122 +0,0 @@
# Contributing to baseimage-cloud9
## Gotchas
* While contributing make sure to make all your changes before creating a Pull Request, as our pipeline builds each commit after the PR is open.
* Read, and fill the Pull Request template
* If this is a fix for a typo in code or documentation in the README please file an issue
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://discord.gg/YWrKVTn)
## Common files
| File | Use case |
| :----: | --- |
| `Dockerfile` | Dockerfile used to build amd64 images |
| `Dockerfile.aarch64` | Dockerfile used to build 64bit ARM architectures |
| `Dockerfile.armhf` | Dockerfile used to build 32bit ARM architectures |
| `Jenkinsfile` | This file is a product of our builder and should not be edited directly. This is used to build the image |
| `jenkins-vars.yml` | This file is used to generate the `Jenkinsfile` mentioned above, it only affects the build-process |
| `package_versions.txt` | This file is generated as a part of the build-process and should not be edited directly. It lists all the installed packages and their versions |
| `README.md` | This file is a product of our builder and should not be edited directly. This displays the readme for the repository and image registries |
| `readme-vars.yml` | This file is used to generate the `README.md` |
## Readme
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-cloud9/edit/master/readme-vars.yml).
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io)
### Fixing typos or clarify the text in the readme
There are variables for multiple parts of the readme, the most common ones are:
| Variable | Description |
| :----: | --- |
| `project_blurb` | This is the short excerpt shown above the project logo. |
| `app_setup_block` | This is the text that shows up under "Application Setup" if enabled |
### Parameters
The compose and run examples are also generated from these variables.
We have a [reference file](https://github.com/linuxserver/docker-jenkins-builder/blob/master/vars/_container-vars-blank) in our Jenkins Builder.
These are prefixed with `param_` for required parameters, or `opt_param` for optional parameters, except for `cap_add`.
Remember to enable param, if currently disabled. This differs between parameters, and can be seen in the reference file.
Devices, environment variables, ports and volumes expects its variables in a certain way.
### Devices
```yml
param_devices:
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "For hardware transcoding" }
opt_param_devices:
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "For hardware transcoding" }
```
### Environment variables
```yml
param_env_vars:
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
opt_param_env_vars:
- { env_var: "VERSION", env_value: "latest", desc: "Supported values are LATEST, PLEXPASS or a specific version number." }
```
### Ports
```yml
param_ports:
- { external_port: "80", internal_port: "80", port_desc: "Application WebUI" }
opt_param_ports:
- { external_port: "80", internal_port: "80", port_desc: "Application WebUI" }
```
### Volumes
```yml
param_volumes:
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Configuration files." }
opt_param_volumes:
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Configuration files." }
```
### Testing template changes
After you make any changes to the templates, you can use our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) to have the files updated from the modified templates. Please use the command found under `Running Locally` [on this page](https://github.com/linuxserver/docker-jenkins-builder/blob/master/README.md) to generate them prior to submitting a PR.
## Dockerfiles
We use multiple Dockerfiles in our repos, this is because sometimes some CPU architectures needs different packages to work.
If you are proposing additional packages to be added, ensure that you added the packages to all the Dockerfiles in alphabetical order.
### Testing your changes
```
git clone https://github.com/linuxserver/docker-baseimage-cloud9.git
cd docker-baseimage-cloud9
docker build \
--no-cache \
--pull \
-t linuxserver/baseimage-cloud9:latest .
```
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
```
docker run --rm --privileged multiarch/qemu-user-static:register --reset
```
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
## Update the chagelog
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-baseimage-cloud9/tree/master/root), add an entry to the changelog
```yml
changelogs:
- { date: "DD.MM.YY:", desc: "Added some love to templates" }
```

2
.github/FUNDING.yml vendored
Wyświetl plik

@ -1,2 +0,0 @@
github: linuxserver
open_collective: linuxserver

Wyświetl plik

@ -1,38 +0,0 @@
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
<!--- If this acts as a feature request please ask yourself if this modification is something the whole userbase will benefit from --->
<!--- If this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
<!--- Provide a general summary of the issue in the Title above -->
------------------------------
## Expected Behavior
<!--- Tell us what should happen -->
## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
## Environment
**OS:**
**CPU architecture:** x86_64/arm32/arm64
**How docker service was installed:**
<!--- ie. from the official docker repo, from the distro repo, nas OS provided, etc. -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Command used to create docker container (run/create/compose/screenshot)
<!--- Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container -->
## Docker logs
<!--- Provide a full docker log, output of "docker logs baseimage-cloud9" -->

Wyświetl plik

@ -1,43 +0,0 @@
<!--- Provide a general summary of your changes in the Title above -->
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- Before submitting a pull request please check the following -->
<!--- If this is a fix for a typo in code or documentation in the README please file an issue and let us sort it out we do not need a PR -->
<!--- Ask yourself if this modification is something the whole userbase will benefit from, if this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
<!--- We maintain a changelog of major revisions to the container at the end of readme-vars.yml in the root of this repository, please add your changes there if appropriate -->
<!--- Coding guidelines: -->
<!--- 1. Installed packages in the Dockerfiles should be in alphabetical order -->
<!--- 2. Changes to Dockerfile should be replicated in Dockerfile.armhf and Dockerfile.aarch64 if applicable -->
<!--- 3. Indentation style (tabs vs 4 spaces vs 1 space) should match the rest of the document -->
<!--- 4. Readme is auto generated from readme-vars.yml, make your changes there -->
------------------------------
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-cloud9/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
------------------------------
<!--- We welcome all PRs though this doesnt guarantee it will be accepted. -->
## Description:
<!--- Describe your changes in detail -->
## Benefits of this PR and context:
<!--- Please explain why we should accept this PR. If this fixes an outstanding bug, please reference the issue # -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
## Source / References:
<!--- Please include any forum posts/github links relevant to the PR -->

Wyświetl plik

@ -1,13 +0,0 @@
name: Greetings
on: [pull_request_target, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [issue template](https://github.com/linuxserver/docker-baseimage-cloud9/blob/master/.github/ISSUE_TEMPLATE.md)!'
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-baseimage-cloud9/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
repo-token: ${{ secrets.GITHUB_TOKEN }}

Wyświetl plik

@ -1,23 +0,0 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: "30 1 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v1
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."
stale-pr-message: "This pull request 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."
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-stale: 30
days-before-close: 365
exempt-issue-labels: 'awaiting-approval,work-in-progress'
exempt-pr-labels: 'awaiting-approval,work-in-progress'
repo-token: ${{ secrets.GITHUB_TOKEN }}

1
.gitignore vendored 100644
Wyświetl plik

@ -0,0 +1 @@
.jenkins-external

Wyświetl plik

@ -1,50 +1,44 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.11
FROM forge.citizen4.eu/miklo/baseimage-cloud9:files as builder
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
ARG NPM_CONFIG_UNSAFE_PERM=true
ARG VERSION=baseimage-cloud9-jammy
LABEL build_version="forge.citizen4.eu version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="miklo"
# add files from c9base
COPY --from=builder /buildout/ /
RUN \
echo "**** install base packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
curl \
git \
gnupg \
sudo \
unzip \
zip \
ca-certificates \
ssh \
mc \
wget && \
echo "**** Cleanup and user perms ****" && \
usermod -aG sudo \
abc && \
apt-get autoclean && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
# add local files
COPY /root /
COPY root/ /
RUN \
echo "**** install build packages ****" && \
apk add --no-cache \
g++ \
gcc \
git \
libgcc \
libxml2-dev \
make \
nodejs \
openssl-dev \
python \
tmux
RUN \
echo "**** Compile Cloud9 from source ****" && \
git clone --depth 1 \
https://github.com/c9/core.git c9sdk && \
cd c9sdk && \
sed -i \
's/node-pty-prebuilt/node-pty/g' \
plugins/node_modules/vfs-local/localfs.js && \
mkdir -p /c9bins && \
sed -i \
'/$URL/c\bash /install.sh' \
scripts/install-sdk.sh && \
HOME=/c9bins scripts/install-sdk.sh
RUN \
echo "**** Restructure files for copy ****" && \
mkdir -p \
/buildout && \
rm -Rf \
/c9bins/.c9/tmp && \
mv \
/c9bins \
/buildout/c9bins && \
mv \
/c9sdk \
/buildout/
# ports and volumes
EXPOSE 8000
VOLUME /code

Wyświetl plik

@ -1,50 +1,37 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.11
FROM ghcr.io/linuxserver/baseimage-cloud9:arm64v8-files as builder
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-bionic
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
ARG NPM_CONFIG_UNSAFE_PERM=true
# add files from c9base
COPY --from=builder /buildout/ /
RUN \
echo "**** install base packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
curl \
git \
gnupg \
sudo \
unzip \
zip && \
echo "**** Cleanup and user perms ****" && \
usermod -aG sudo \
abc && \
apt-get autoclean && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
# add local files
COPY /root /
COPY root/ /
RUN \
echo "**** install build packages ****" && \
apk add --no-cache \
g++ \
gcc \
git \
libgcc \
libxml2-dev \
make \
nodejs \
openssl-dev \
python \
tmux
RUN \
echo "**** Compile Cloud9 from source ****" && \
git clone --depth 1 \
https://github.com/c9/core.git c9sdk && \
cd c9sdk && \
sed -i \
's/node-pty-prebuilt/node-pty/g' \
plugins/node_modules/vfs-local/localfs.js && \
mkdir -p /c9bins && \
sed -i \
'/$URL/c\bash /install.sh' \
scripts/install-sdk.sh && \
HOME=/c9bins scripts/install-sdk.sh
RUN \
echo "**** Restructure files for copy ****" && \
mkdir -p \
/buildout && \
rm -Rf \
/c9bins/.c9/tmp && \
mv \
/c9bins \
/buildout/c9bins && \
mv \
/c9sdk \
/buildout/
# ports and volumes
EXPOSE 8000
VOLUME /code

Wyświetl plik

@ -1,50 +1,37 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.11
FROM ghcr.io/linuxserver/baseimage-cloud9:arm32v7-files as builder
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-bionic
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
ARG NPM_CONFIG_UNSAFE_PERM=true
# add files from c9base
COPY --from=builder /buildout/ /
RUN \
echo "**** install base packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
curl \
git \
gnupg \
sudo \
unzip \
zip && \
echo "**** Cleanup and user perms ****" && \
usermod -aG sudo \
abc && \
apt-get autoclean && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
# add local files
COPY /root /
COPY root/ /
RUN \
echo "**** install build packages ****" && \
apk add --no-cache \
g++ \
gcc \
git \
libgcc \
libxml2-dev \
make \
nodejs \
openssl-dev \
python \
tmux
RUN \
echo "**** Compile Cloud9 from source ****" && \
git clone --depth 1 \
https://github.com/c9/core.git c9sdk && \
cd c9sdk && \
sed -i \
's/node-pty-prebuilt/node-pty/g' \
plugins/node_modules/vfs-local/localfs.js && \
mkdir -p /c9bins && \
sed -i \
'/$URL/c\bash /install.sh' \
scripts/install-sdk.sh && \
HOME=/c9bins scripts/install-sdk.sh
RUN \
echo "**** Restructure files for copy ****" && \
mkdir -p \
/buildout && \
rm -Rf \
/c9bins/.c9/tmp && \
mv \
/c9bins \
/buildout/c9bins && \
mv \
/c9sdk \
/buildout/
# ports and volumes
EXPOSE 8000
VOLUME /code

626
Jenkinsfile vendored
Wyświetl plik

@ -1,626 +0,0 @@
pipeline {
agent {
label 'X86-64-MULTI'
}
options {
buildDiscarder(logRotator(numToKeepStr: '10', daysToKeepStr: '60'))
parallelsAlwaysFailFast()
}
// Input to determine if this is a package check
parameters {
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
}
// Configuration for the variables used for this specific repo
environment {
BUILDS_DISCORD=credentials('build_webhook_url')
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
BUILD_VERSION_ARG = 'CLOUD9_VERSION'
LS_USER = 'linuxserver'
LS_REPO = 'docker-baseimage-cloud9'
CONTAINER_NAME = 'baseimage-cloud9'
DOCKERHUB_IMAGE = 'lsiobase/cloud9'
DEV_DOCKERHUB_IMAGE = 'lsiodev/cloud9-base'
PR_DOCKERHUB_IMAGE = 'lspipepr/cloud9-base'
DIST_IMAGE = 'alpine'
MULTIARCH='true'
CI='false'
}
stages {
// Setup all the basic environment variables needed for the build
stage("Set ENV Variables base"){
steps{
script{
env.EXIT_STATUS = ''
env.LS_RELEASE = sh(
script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':files-alpine 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
returnStdout: true).trim()
env.LS_RELEASE_NOTES = sh(
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
returnStdout: true).trim()
env.GITHUB_DATE = sh(
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
returnStdout: true).trim()
env.COMMIT_SHA = sh(
script: '''git rev-parse HEAD''',
returnStdout: true).trim()
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/greetings.yml ./.github/workflows/stale.yml'
}
script{
env.LS_RELEASE_NUMBER = sh(
script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''',
returnStdout: true).trim()
}
script{
env.LS_TAG_NUMBER = sh(
script: '''#! /bin/bash
tagsha=$(git rev-list -n 1 ${LS_RELEASE} 2>/dev/null)
if [ "${tagsha}" == "${COMMIT_SHA}" ]; then
echo ${LS_RELEASE_NUMBER}
elif [ -z "${GIT_COMMIT}" ]; then
echo ${LS_RELEASE_NUMBER}
else
echo $((${LS_RELEASE_NUMBER} + 1))
fi''',
returnStdout: true).trim()
}
}
}
/* #######################
Package Version Tagging
####################### */
// Grab the current package versions in Git to determine package tag
stage("Set Package tag"){
steps{
script{
env.PACKAGE_TAG = sh(
script: '''#!/bin/bash
if [ -e package_versions.txt ] ; then
cat package_versions.txt | md5sum | cut -c1-8
else
echo none
fi''',
returnStdout: true).trim()
}
}
}
/* ########################
External Release Tagging
######################## */
// If this is a custom command to determine version use that command
stage("Set tag custom bash"){
steps{
script{
env.EXT_RELEASE = sh(
script: ''' echo c4d1c59d-alpine ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command'
}
}
}
// Sanitize the release tag and strip illegal docker or github characters
stage("Sanitize tag"){
steps{
script{
env.EXT_RELEASE_CLEAN = sh(
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
returnStdout: true).trim()
}
}
}
// If this is a files-alpine build use live docker endpoints
stage("Set ENV live build"){
when {
branch "files-alpine"
environment name: 'CHANGE_ID', value: ''
}
steps {
script{
env.IMAGE = env.DOCKERHUB_IMAGE
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/' + env.CONTAINER_NAME
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
}
}
}
// If this is a dev build use dev docker endpoints
stage("Set ENV dev build"){
when {
not {branch "files-alpine"}
environment name: 'CHANGE_ID', value: ''
}
steps {
script{
env.IMAGE = env.DEV_DOCKERHUB_IMAGE
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lsiodev-' + env.CONTAINER_NAME
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
}
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
}
}
}
// If this is a pull request build use dev docker endpoints
stage("Set ENV PR build"){
when {
not {environment name: 'CHANGE_ID', value: ''}
}
steps {
script{
env.IMAGE = env.PR_DOCKERHUB_IMAGE
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lspipepr-' + env.CONTAINER_NAME
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
}
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
}
}
}
// Run ShellCheck
stage('ShellCheck') {
when {
environment name: 'CI', value: 'true'
}
steps {
withCredentials([
string(credentialsId: 'ci-tests-s3-key-id', variable: 'S3_KEY'),
string(credentialsId: 'ci-tests-s3-secret-access-key', variable: 'S3_SECRET')
]) {
script{
env.SHELLCHECK_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml'
}
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash'''
sh '''#! /bin/bash
set -e
docker pull ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest
docker run --rm \
-e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \
-e FILE_NAME="shellcheck-result.xml" \
-e MIMETYPE="text/xml" \
-v ${WORKSPACE}:/mnt \
-e SECRET_KEY=\"${S3_SECRET}\" \
-e ACCESS_KEY=\"${S3_KEY}\" \
-t ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest \
python /upload.py'''
}
}
}
// Use helper containers to render templated files
stage('Update-Templates') {
when {
branch "files-alpine"
environment name: 'CHANGE_ID', value: ''
expression {
env.CONTAINER_NAME != null
}
}
steps {
sh '''#! /bin/bash
set -e
TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=files-alpine -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]]; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f files-alpine
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/
cd ${TEMPDIR}/repo/${LS_REPO}/
git add ${TEMPLATED_FILES}
git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
fi
mkdir -p ${TEMPDIR}/gitbook
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
if [[ "${BRANCH_NAME}" == "master" ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
cd ${TEMPDIR}/gitbook/docker-documentation/
git add images/docker-${CONTAINER_NAME}.md
git commit -m 'Bot Updating Documentation'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
fi
rm -Rf ${TEMPDIR}'''
script{
env.FILES_UPDATED = sh(
script: '''cat /tmp/${COMMIT_SHA}-${BUILD_NUMBER}''',
returnStdout: true).trim()
}
}
}
// Exit the build if the Templated files were just updated
stage('Template-exit') {
when {
branch "files-alpine"
environment name: 'CHANGE_ID', value: ''
environment name: 'FILES_UPDATED', value: 'true'
expression {
env.CONTAINER_NAME != null
}
}
steps {
script{
env.EXIT_STATUS = 'ABORTED'
}
}
}
/* #######################
GitLab Mirroring
####################### */
// Ping into Gitlab to mirror this repo and have a registry endpoint
stage("GitLab Mirror"){
when {
environment name: 'EXIT_STATUS', value: ''
}
steps{
sh '''curl -H "Content-Type: application/json" -H "Private-Token: ${GITLAB_TOKEN}" -X POST https://gitlab.com/api/v4/projects \
-d '{"namespace_id":'${GITLAB_NAMESPACE}',\
"name":"'${LS_REPO}'",
"mirror":true,\
"import_url":"https://github.com/linuxserver/'${LS_REPO}'.git",\
"issues_access_level":"disabled",\
"merge_requests_access_level":"disabled",\
"repository_access_level":"enabled",\
"visibility":"public"}' '''
}
}
/* ###############
Build Container
############### */
// Build Docker container for push to LS Repo
stage('Build-Single') {
when {
environment name: 'MULTIARCH', value: 'false'
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh "docker build --no-cache --pull -t ${IMAGE}:${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
// Build MultiArch Docker containers for push to LS Repo
stage('Build-Multi') {
when {
environment name: 'MULTIARCH', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
parallel {
stage('Build X86') {
steps {
sh "docker build --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
stage('Build ARMHF') {
agent {
label 'X86-64-MULTI'
}
steps {
echo 'Logging into Github'
sh '''#! /bin/bash
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
'''
sh "docker build --no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
retry(5) {
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
}
sh '''docker rmi \
${IMAGE}:arm32v7-${META_TAG} \
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
}
}
stage('Build ARM64') {
agent {
label 'X86-64-MULTI'
}
steps {
echo 'Logging into Github'
sh '''#! /bin/bash
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
'''
sh "docker build --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
retry(5) {
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
}
sh '''docker rmi \
${IMAGE}:arm64v8-${META_TAG} \
ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
}
}
}
}
/* #######
Testing
####### */
// Run Container tests
stage('Test') {
when {
environment name: 'CI', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
string(credentialsId: 'ci-tests-s3-key-id', variable: 'S3_KEY'),
string(credentialsId: 'ci-tests-s3-secret-access-key ', variable: 'S3_SECRET')
]) {
script{
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
}
sh '''#! /bin/bash
set -e
docker pull ghcr.io/linuxserver/lsiodev-ci:latest
if [ "${MULTIARCH}" == "true" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi
docker run --rm \
--shm-size=1gb \
-v /var/run/docker.sock:/var/run/docker.sock \
-e IMAGE=\"${IMAGE}\" \
-e DELAY_START=\"${CI_DELAY}\" \
-e TAGS=\"${CI_TAGS}\" \
-e META_TAG=\"${META_TAG}\" \
-e PORT=\"${CI_PORT}\" \
-e SSL=\"${CI_SSL}\" \
-e BASE=\"${DIST_IMAGE}\" \
-e SECRET_KEY=\"${S3_SECRET}\" \
-e ACCESS_KEY=\"${S3_KEY}\" \
-e DOCKER_ENV=\"${CI_DOCKERENV}\" \
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
-e WEB_AUTH=\"${CI_AUTH}\" \
-e WEB_PATH=\"${CI_WEBPATH}\" \
-e DO_REGION="ams3" \
-e DO_BUCKET="lsio-ci" \
-t ghcr.io/linuxserver/lsiodev-ci:latest \
python /ci/ci.py'''
}
}
}
/* ##################
Release Logic
################## */
// If this is an amd64 only image only push a single image
stage('Docker-Push-Single') {
when {
environment name: 'MULTIARCH', value: 'false'
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
retry(5) {
sh '''#! /bin/bash
set -e
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:files-alpine
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
docker push ${PUSHIMAGE}:files-alpine
docker push ${PUSHIMAGE}:${META_TAG}
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
done
'''
}
sh '''#! /bin/bash
for DELETEIMAGE in "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
docker rmi \
${DELETEIMAGE}:${META_TAG} \
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
${DELETEIMAGE}:files-alpine || :
done
'''
}
}
}
// If this is a multi arch release push all images and define the manifest
stage('Docker-Push-Multi') {
when {
environment name: 'MULTIARCH', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
retry(5) {
sh '''#! /bin/bash
set -e
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
if [ "${CI}" == "false" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}"; do
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-files-alpine
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-files-alpine
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-files-alpine
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker push ${MANIFESTIMAGE}:amd64-files-alpine
docker push ${MANIFESTIMAGE}:arm32v7-files-alpine
docker push ${MANIFESTIMAGE}:arm64v8-files-alpine
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
docker manifest push --purge ${MANIFESTIMAGE}:files-alpine || :
docker manifest create ${MANIFESTIMAGE}:files-alpine ${MANIFESTIMAGE}:amd64-files-alpine ${MANIFESTIMAGE}:arm32v7-files-alpine ${MANIFESTIMAGE}:arm64v8-files-alpine
docker manifest annotate ${MANIFESTIMAGE}:files-alpine ${MANIFESTIMAGE}:arm32v7-files-alpine --os linux --arch arm
docker manifest annotate ${MANIFESTIMAGE}:files-alpine ${MANIFESTIMAGE}:arm64v8-files-alpine --os linux --arch arm64 --variant v8
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
docker manifest push --purge ${MANIFESTIMAGE}:files-alpine
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
done
'''
}
}
}
}
// If this is a public release tag it in the LS Github
stage('Github-Tag-Push-Release') {
when {
branch "files-alpine"
expression {
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
echo "Pushing New tag for current commit ${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}"
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to files-alpine",\
"type": "commit",\
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "files-alpine",\
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**Remote Changes:**\\n\\n' > start
printf '","draft": false,"prerelease": true}' >> releasebody.json
paste -d'\\0' start releasebody.json > releasebody.json.done
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
}
}
// Use helper container to sync the current README on master to the dockerhub endpoint
stage('Sync-README') {
when {
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
sh '''#! /bin/bash
set -e
TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
docker pull ghcr.io/linuxserver/lsiodev-readme-sync
docker run --rm=true \
-e DOCKERHUB_USERNAME=$DOCKERUSER \
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \
-e DOCKER_REPOSITORY=${IMAGE} \
-e GIT_BRANCH=master \
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
ghcr.io/linuxserver/lsiodev-readme-sync bash -c 'node sync'
rm -Rf ${TEMPDIR} '''
}
}
}
// If this is a Pull request send the CI link as a comment on it
stage('Pull Request Comment') {
when {
not {environment name: 'CHANGE_ID', value: ''}
environment name: 'CI', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/issues/${PULL_REQUEST}/comments \
-d '{"body": "I am a bot, here are the test results for this PR: \\n'${CI_URL}' \\n'${SHELLCHECK_URL}'"}' '''
}
}
}
/* ######################
Send status to Discord
###################### */
post {
always {
script{
if (env.EXIT_STATUS == "ABORTED"){
sh 'echo "build aborted"'
}
else if (currentBuild.currentResult == "SUCCESS"){
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 1681177,\
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}
else {
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 16711680,\
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}
}
}
cleanup {
cleanWs()
}
}
}

Wyświetl plik

@ -1,5 +1,9 @@
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read the CONTRIBUTING.md -->
<!-- Please read the https://github.com/linuxserver/docker-baseimage-cloud9/blob/master/.github/CONTRIBUTING.md -->
# 2023-08-06 INITIAL FORK
Forked from linuxserver/docker-baseimage-cloud9 for upgrade base image and all tools to most current versions
[linuxserverurl]: https://linuxserver.io
[forumurl]: https://forum.linuxserver.io
@ -7,14 +11,6 @@
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png?v=4&s=4000)][linuxserverurl]
## Contact information:-
| Type | Address/Details |
| :---: | --- |
| Discord | [Discord](https://discord.gg/YWrKVTn) |
| IRC | freenode at `#linuxserver.io` more information at:- [IRC][ircurl]
| Forum | [Linuserver.io forum][forumurl] |
&nbsp;
&nbsp;
@ -24,6 +20,3 @@
A custom base image built with [Ubuntu linux](https://www.ubuntu.com/) and [Cloud9](https://github.com/c9/core)..
The following line is only in this repo for loop testing:
- { date: "01.01.50:", desc: "I am the release message for this internal repo." }

Wyświetl plik

@ -1,22 +0,0 @@
---
# jenkins variables
project_name: docker-baseimage-cloud9
external_type: na
custom_version_command: "echo c4d1c59d-alpine"
release_type: prerelease
release_tag: files-alpine
ls_branch: files-alpine
skip_package_check: true
use_qemu: true
repo_vars:
- BUILD_VERSION_ARG = 'CLOUD9_VERSION'
- LS_USER = 'linuxserver'
- LS_REPO = 'docker-baseimage-cloud9'
- CONTAINER_NAME = 'baseimage-cloud9'
- DOCKERHUB_IMAGE = 'lsiobase/cloud9'
- DEV_DOCKERHUB_IMAGE = 'lsiodev/cloud9-base'
- PR_DOCKERHUB_IMAGE = 'lspipepr/cloud9-base'
- DIST_IMAGE = 'alpine'
- MULTIARCH='true'
- CI='false'

Wyświetl plik

@ -1,5 +1,5 @@
---
project_deprecation_status: true
# project information
project_name: baseimage-cloud9
full_custom_readme: |
@ -16,7 +16,7 @@ full_custom_readme: |
| :---: | --- |
| Discord | [Discord](https://discord.gg/YWrKVTn) |
| IRC | freenode at `#linuxserver.io` more information at:- [IRC][ircurl]
| Forum | [Linuserver.io forum][forumurl] |
| Forum | [LinuxServer.io forum][forumurl] |
&nbsp;
&nbsp;

Wyświetl plik

@ -0,0 +1,31 @@
#!/usr/bin/with-contenv bash
# check for lock file to only run git operations once
if [ ! -e /lock.file ]; then
# give abc a sudo shell for development
chsh abc -s /bin/bash
sed -e 's/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' \
-i /etc/sudoers
sed -e 's/^wheel:\(.*\)/wheel:\1,abc/g' -i /etc/group
# create directory for project
mkdir -p /code
# make sure URL is set and folder is empty to clone code
if [ ${GITURL+x} ] && [ ! "$(/bin/ls -A /code 2>/dev/null)" ] ; then \
# clone the url the user passed to this directory
git clone "${GITURL}" /code
fi
else
# lock exists not importing project this is a restart
echo "Lock exists just starting cloud9"
fi
# create lock file after first run
touch /lock.file
# permissions
mkdir -p /c9sdk/build/standalone
echo "[cont-init.d] Setting permissions this may take some time"
chown -R abc:abc \
/c9sdk/build/standalone \
/code \
/c9bins

Wyświetl plik

@ -0,0 +1,6 @@
#!/usr/bin/with-contenv bash
cd /c9sdk
HOME=/c9bins exec \
s6-setuidgid abc \
/c9bins/.c9/node/bin/node server.js --listen 0.0.0.0 -p 8000 -w /code -a "${USERNAME}:${PASSWORD}"

Wyświetl plik

@ -1,367 +0,0 @@
#!/bin/bash -e
set -e
has() {
type "$1" > /dev/null 2>&1
}
# Redirect stdout ( > ) into a named pipe ( >() ) running "tee"
# exec > >(tee /tmp/installlog.txt)
# Without this, only stdout would be captured - i.e. your
# log file would not contain any error messages.
exec 2>&1
if has "wget"; then
DOWNLOAD() {
wget --no-check-certificate -nc -O "$2" "$1"
}
elif has "curl"; then
DOWNLOAD() {
curl -sSL -o "$2" "$1"
}
else
echo "Error: you need curl or wget to proceed" >&2;
exit 1
fi
C9_DIR=$HOME/.c9
if [[ ${1-} == -d ]]; then
C9_DIR=$2
shift 2
fi
# Check if C9_DIR exists
if [ ! -d "$C9_DIR" ]; then
mkdir -p $C9_DIR
fi
VERSION=1
NODE_VERSION=v6.3.1
NODE_VERSION_ARM_PI=v0.10.28
NPM=$C9_DIR/node/bin/npm
NODE=$C9_DIR/node/bin/node
export TMP=$C9_DIR/tmp
export TMPDIR=$TMP
PYTHON=python
# node-gyp uses sytem node or fails with command not found if
# we don't bump this node up in the path
PATH="$C9_DIR/node/bin/:$C9_DIR/node_modules/.bin:$PATH"
start() {
if [ $# -lt 1 ]; then
start base
return
fi
check_deps
# Try to figure out the os and arch for binary fetching
local uname="$(uname -s)"
local os=
local arch="$(uname -m)"
case "$uname" in
Linux*) os=linux ;;
Darwin*) os=darwin ;;
SunOS*) os=sunos ;;
FreeBSD*) os=freebsd ;;
CYGWIN*) os=windows ;;
MINGW*) os=windows ;;
esac
case "$arch" in
*arm64*) arch=arm64 ;;
*aarch64*) arch=arm64 ;;
*armv6l*) arch=armv6l ;;
*armv7l*) arch=armv7l ;;
*x86_64*) arch=x64 ;;
*i*86*) arch=x86 ;;
*)
echo "Unsupported Architecture: $os $arch" 1>&2
exit 1
;;
esac
if [ "$arch" == "x64" ] && [[ $HOSTTYPE == i*86 ]]; then
arch=x86 # check if 32 bit bash is installed on 64 bit kernel
fi
if [ "$os" != "linux" ] && [ "$os" != "darwin" ]; then
echo "Unsupported Platform: $os $arch" 1>&2
exit 1
fi
case $1 in
"help" )
echo
echo "Cloud9 Installer"
echo
echo "Usage:"
echo " install help Show this message"
echo " install install [name [name ...]] Download and install a set of packages"
echo " install ls List available packages"
echo
;;
"ls" )
echo "!node - Node.js"
echo "!tmux - TMUX"
echo "!nak - NAK"
echo "!ptyjs - pty.js"
echo "!collab - collab"
echo "coffee - Coffee Script"
echo "less - Less"
echo "sass - Sass"
echo "typescript - TypeScript"
echo "stylus - Stylus"
# echo "go - Go"
# echo "heroku - Heroku"
# echo "rhc - RedHat OpenShift"
# echo "gae - Google AppEngine"
;;
"install" )
shift
# make sure dirs are around
mkdir -p "$C9_DIR"/bin
mkdir -p "$C9_DIR"/tmp
mkdir -p "$C9_DIR"/node_modules
# install packages
while [ $# -ne 0 ]
do
if [ "$1" == "tmux" ]; then
cd "$C9_DIR"
time tmux_install $os $arch
shift
continue
fi
cd "$C9_DIR"
time eval ${1} $os $arch
shift
done
# finalize
pushd "$C9_DIR"/node_modules/.bin
for FILE in "$C9_DIR"/node_modules/.bin/*; do
FILE=$(readlink "$FILE")
# can't use the -i flag since it is not compatible between bsd and gnu versions
sed -e's/#!\/usr\/bin\/env node/#!'"${NODE//\//\\/}/" "$FILE" > "$FILE.tmp-sed"
mv "$FILE.tmp-sed" "$FILE"
done
popd
echo $VERSION > "$C9_DIR"/installed
cd "$C9_DIR"
DOWNLOAD https://raw.githubusercontent.com/c9/install/master/packages/license-notice.md "Third-Party Licensing Notices.md"
echo :Done.
;;
"base" )
echo "Installing base packages. Use --help for more options"
start install node tmux_install nak ptyjs collab
;;
* )
start base
;;
esac
}
check_deps() {
local ERR
local OS
if [[ `cat /etc/os-release 2>/dev/null` =~ CentOS ]]; then
OS="CentOS"
elif [[ `cat /proc/version 2>/dev/null` =~ Ubuntu|Debian ]]; then
OS="DEBIAN"
fi
for DEP in make gcc; do
if ! has $DEP; then
echo "Error: please install $DEP to proceed" >&2
if [ "$OS" == "CentOS" ]; then
echo "To do so, log into your machine and type 'yum groupinstall -y development'" >&2
elif [ "$OS" == "DEBIAN" ]; then
echo "To do so, log into your machine and type 'sudo apt-get install build-essential'" >&2
fi
ERR=1
fi
done
# CentOS
if [ "$OS" == "CentOS" ]; then
if ! yum list installed glibc-static >/dev/null 2>&1; then
echo "Error: please install glibc-static to proceed" >&2
echo "To do so, log into your machine and type 'yum install glibc-static'" >&2
ERR=1
fi
fi
check_python
if [ "$ERR" ]; then exit 1; fi
}
check_python() {
if type -P python2.7 &> /dev/null; then
PYTHONVERSION="2.7"
PYTHON="python2.7"
elif type -P python &> /dev/null; then
PYTHONVERSION=`python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'`
PYTHON="python"
fi
if [[ $PYTHONVERSION != "2.7" ]]; then
echo "Python version 2.7 is required to install pty.js. Please install python 2.7 and try again. You can find more information on how to install Python in the docs: https://docs.c9.io/ssh_workspaces.html"
exit 100
fi
}
# NodeJS
download_virtualenv() {
VIRTUALENV_VERSION="virtualenv-12.0.7"
DOWNLOAD "https://pypi.python.org/packages/source/v/virtualenv/$VIRTUALENV_VERSION.tar.gz" $VIRTUALENV_VERSION.tar.gz
tar xzf $VIRTUALENV_VERSION.tar.gz
rm $VIRTUALENV_VERSION.tar.gz
mv $VIRTUALENV_VERSION virtualenv
}
ensure_local_gyp() {
# when gyp is installed globally npm install pty.js won't work
# to test this use `sudo apt-get install gyp`
if [ `"$PYTHON" -c 'import gyp; print gyp.__file__' 2> /dev/null` ]; then
echo "You have a global gyp installed. Setting up VirtualEnv without global pakages"
rm -rf virtualenv
rm -rf python
if has virtualenv; then
virtualenv -p python2 "$C9_DIR/python"
else
download_virtualenv
"$PYTHON" virtualenv/virtualenv.py "$C9_DIR/python"
fi
if [[ -f "$C9_DIR/python/bin/python2" ]]; then
PYTHON="$C9_DIR/python/bin/python2"
else
echo "Unable to setup virtualenv"
exit 1
fi
fi
"$NPM" config -g set python "$PYTHON"
"$NPM" config -g set unsafe-perm true
local GYP_PATH=$C9_DIR/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
if [ -f "$GYP_PATH" ]; then
ln -s "$GYP_PATH" "$C9_DIR"/node/bin/node-gyp &> /dev/null || :
fi
}
node(){
echo :Installing Node $NODE_VERSION
DOWNLOAD https://nodejs.org/dist/"$NODE_VERSION/node-$NODE_VERSION-$1-$2.tar.gz" node.tar.gz
tar xzf node.tar.gz
mv "node-$NODE_VERSION-$1-$2" node
rm -f node.tar.gz
cp /usr/bin/node /c9bins/.c9/node/bin/
# use local npm cache
"$NPM" config -g set cache "$C9_DIR/tmp/.npm"
ensure_local_gyp
}
tmux_install(){
mkdir -p /c9bins/.c9/bin/
cp /usr/bin/tmux /c9bins/.c9/bin/tmux
}
collab(){
echo :Installing Collab Dependencies
"$NPM" cache clean
"$NPM" install sqlite3
"$NPM" install sequelize@2.0.0-beta.0
mkdir -p "$C9_DIR"/lib
cd "$C9_DIR"/lib
DOWNLOAD https://raw.githubusercontent.com/c9/install/master/packages/sqlite3/linux/sqlite3.tar.gz sqlite3.tar.gz
tar xzf sqlite3.tar.gz
rm sqlite3.tar.gz
ln -sf "$C9_DIR"/lib/sqlite3/sqlite3 "$C9_DIR"/bin/sqlite3
}
nak(){
echo :Installing Nak
"$NPM" install https://github.com/c9/nak/tarball/c9
}
ptyjs(){
echo :Installing pty.js
"$NPM" install node-pty
if ! hasPty; then
echo "Unknown exception installing pty.js"
"$C9_DIR/node/bin/node" -e "console.log(require('node-pty'))"
exit 100
fi
}
hasPty() {
local HASPTY=$("$C9_DIR/node/bin/node" -p "typeof require('node-pty').createTerminal=='function'" 2> /dev/null)
if [ "$HASPTY" != true ]; then
return 1
fi
}
coffee(){
echo :Installing Coffee Script
"$NPM" install coffee
}
less(){
echo :Installing Less
"$NPM" install less
}
sass(){
echo :Installing Sass
"$NPM" install sass
}
typescript(){
echo :Installing TypeScript
"$NPM" install typescript
}
stylus(){
echo :Installing Stylus
"$NPM" install stylus
}
# go(){
# }
# heroku(){
# }
# rhc(){
# }
# gae(){
# }
start "$@"
# cleanup tmp files
rm -rf "$C9_DIR/tmp"