Skip to content
Snippets Groups Projects
Commit 65dfa821 authored by Sydney Anne Erickson's avatar Sydney Anne Erickson :chipmunk:
Browse files

Android doc

parent 65c07533
No related branches found
No related tags found
No related merge requests found
Pipeline #6809 passed
......@@ -2,4 +2,82 @@
title: Android CI
---
# This is a test page
We provide two Android CI runners to the `elixxir` and `xx-network` groups on [git.xx.network](https://git.xx.network/). The documentation below describes the software they run, how the teams can use them, and information for the IT team on their maintenance.
## Installed Software
The following software is installed onto the Android CI VM for you to use as an end user.
- Java OpenJDK 8
- Android SDK Tools (version 3859397)
- Android platform SDK (version 25)
- Android platform SDK (version 29)
- Android platform SDK (version 30)
- Android platform tools
- Android build tools (version 29.0.2)
- Android Emulator
- Android Emulator system image (API version 25, x86, with Google APIs)
## Using the Android CI
You just need to tag the builds that need the Android tooling in your `gitlab-ci.yml` file with the `android` tag. An example is below. This should only be done for jobs where the Android SDK tools are directly required, as job capacity is very limited.
```yml
stages:
- build
app-build:
tags:
- android
stage: build
script:
- commands
- to
- build
- your
- app
```
---
# IT Team Internal Information
## VM Install Script
This is the exact script used to setup an Android CI VM image. Any changes to the CI VM must be put into this script by Sydney Anne.
```sh
#!/usr/bin/env bash
set -e
# --- System ---
# Firewall
sudo apt-get install -y ufw
sudo ufw allow ssh
sudo ufw enable
# Fail2Ban
sudo apt-get install -y fail2ban
# --- Java ---
sudo apt-get install -y openjdk-8-jdk-headless
# --- Android SDK ---
sudo apt-get install -y wget tar unzip lib32stdc++6 lib32z1
wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
unzip -d android-sdk-linux android-sdk.zip
echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-29"
echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-30"
echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools"
echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;29.0.2"
yes | android-sdk-linux/tools/bin/sdkmanager --licenses --no_https
yes | android-sdk-linux/tools/bin/sdkmanager --no_https "emulator" "platform-tools" "platforms;android-25" "system-images;android-25;google_apis;x86"
rm -rf android-sdk.zip
sudo mv android-sdk-linux /android-sdk
# --- GitLab ---
# GitLab Runner
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | sudo bash
export GITLAB_RUNNER_DISABLE_SKEL=true; sudo -E apt-get install -y gitlab-runner
sudo gitlab-runner register
```
\ No newline at end of file
---
title: Create a Blog Post
---
This page will help you on how to create blog posts in Docusaurus.
## Create a Blog Post
Create a file at `blog/2021-02-28-greetings.md`:
```md title="blog/2021-02-28-greetings.md"
---
title: Greetings!
author: Steven Hansel
author_title: Docusaurus Contributor
author_url: https://github.com/ShinteiMai
author_image_url: https://github.com/ShinteiMai.png
---
Congratulations, you have made your first post!
Feel free to play around and edit this post as much you like.
```
A new blog post is now available at `http://localhost:3000/blog/greetings`.
---
title: Create a Document
---
Documents are pages with a **sidebar**, a **previous/next navigation** and many other useful features.
## Create a Document
Create a markdown file at `docs/my-doc.md`:
```mdx title="docs/hello.md"
---
title: Hello, World!
---
## Hello, World!
This is your first document in **Docusaurus**, Congratulations!
```
A new document is now available at `http://localhost:3000/docs/hello`.
## Add your document to the sidebar
Add `hello` to the `sidebars.js` file:
```diff title="sidebars.js"
module.exports = {
docs: [
{
type: 'category',
label: 'Docusaurus Tutorial',
- items: ['getting-started', 'create-a-doc', ...],
+ items: ['getting-started', 'create-a-doc', 'hello', ...],
},
],
};
```
---
title: Create a Page
---
Any React or Markdown file created under `src/pages` directory is converted into a website page:
- `src/pages/index.js` -> `localhost:3000/`
- `src/pages/foo.md` -> `localhost:3000/foo`
- `src/pages/foo/bar.js` -> `localhost:3000/foo/bar`
## Create a React Page
Create a file at `src/pages/my-react-page.js`:
```jsx title="src/pages/my-react-page.js"
import React from 'react';
import Layout from '@theme/Layout';
function HelloWorld() {
return (
<Layout>
<h1>My React page</h1>
<p>This is a React page</p>
</Layout>
);
}
```
A new page is now available at `http://localhost:3000/my-react-page`.
## Create a Markdown Page
Create a file at `src/pages/my-markdown-page.md`:
```mdx title="src/pages/my-markdown-page.md"
---
title: My Markdown page
---
# My Markdown page
This is a Markdown page
```
A new page is now available at `http://localhost:3000/my-markdown-page`.
......@@ -3,26 +3,6 @@ title: Getting Started
slug: /
---
## Step 1: Generate a new Docusaurus site
## Welcome to the xx network Git Docs website!
If you haven't already, generate a new Docusaurus site using the classic template:
```shell
npx @docusaurus/init@latest init my-website classic
```
## Step 2: Start your Docusaurus site
Run the development server in the newly created `my-website` folder:
```shell
cd my-website
npx docusaurus start
```
Open `docs/getting-started.md` and edit some lines. The site reloads automatically and display your changes.
## That's it!
Congratulations! You've successfully run and modified your Docusaurus project.
Check out the sidebar for various topics about procedures and structures for our GitLab service.
---
title: Markdown Features
---
Docusaurus supports the [Markdown](https://daringfireball.net/projects/markdown/syntax) syntax and has some additional features.
## Front Matter
Markdown documents can have associated metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/):
```md
---
id: my-doc
title: My document title
description: My document description
sidebar_label: My doc
---
Markdown content
```
## Markdown links
Regular Markdown links are supported using url paths or relative file paths.
```md
Let's see how to [Create a page](/create-a-page).
```
```md
Let's see how to [Create a page](./create-a-page.md).
```
Let's see how to [Create a page](./create-a-page.md).
## Markdown images
Regular Markdown images are supported.
Add an image at `static/img/docusaurus.png` and use this Markdown declaration:
```md
![Docusaurus logo](/img/docusaurus.png)
```
![Docusaurus logo](/img/docusaurus.png)
## Code Blocks
Markdown code blocks are supported with Syntax highlighting.
```jsx title="src/components/HelloDocusaurus.js"
function HelloDocusaurus() {
return (
<h1>Hello, Docusaurus!</h1>
)
}
```
```jsx title="src/components/HelloDocusaurus.js"
function HelloDocusaurus() {
return <h1>Hello, Docusaurus!</h1>;
}
```
## Admonitions
Docusaurus has a special syntax to create admonitions and callouts:
:::tip My tip
Use this awesome feature option
:::
:::danger Take care
This action is dangerous
:::
:::tip My tip
Use this awesome feature option
:::
:::danger Take care
This action is dangerous
:::
## React components
Thanks to [MDX](https://mdxjs.com/), you can make your doc more interactive and use React components inside Markdown:
```jsx
export const Highlight = ({children, color}) => (
<span
style={{
backgroundColor: color,
borderRadius: '2px',
color: 'red',
padding: '0.2rem',
}}>
{children}
</span>
);
<Highlight color="#25c2a0">Docusaurus green</Highlight> and <Highlight color="#1877F2">Facebook blue</Highlight> are my favorite colors.
```
export const Highlight = ({children, color}) => (
<span
style={{
backgroundColor: color,
borderRadius: '2px',
color: '#fff',
padding: '0.2rem',
}}>
{children}
</span>
);
<Highlight color="#25c2a0">Docusaurus green</Highlight> and <Highlight color="#1877F2">
Facebook blue
</Highlight> are my favorite colors.
---
title: Thank you!
---
Congratulations on making it this far!
You have learned the **basics of Docusaurus** and made some changes to the **initial template**.
But Docusaurus has **much more to offer**!
## What's next?
- [Read the official documentation](https://v2.docusaurus.io/).
- [Design and Layout your Docusaurus site](https://v2.docusaurus.io/docs/styling-layout)
- [Integrate a search bar into your site](https://v2.docusaurus.io/docs/search)
- [Find inspirations in Docusaurus showcase](https://v2.docusaurus.io/showcase)
- [Get involved in the Docusaurus Community](https://v2.docusaurus.io/community/support)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment