1
0
mirror of https://git.cloudron.io/cloudron/gitea-app synced 2025-09-25 14:37:44 +00:00

Compare commits

..

8 Commits

Author SHA1 Message Date
Girish Ramakrishnan
ffa9d52206 Version 1.33.3 2024-10-09 09:43:30 +02:00
Girish Ramakrishnan
7d0d52ceae change perms 2024-10-09 09:36:48 +02:00
Girish Ramakrishnan
f19465b3d6 Fix test 2024-10-09 09:28:39 +02:00
Girish Ramakrishnan
662cfae820 Update test packages 2024-10-09 09:19:11 +02:00
Renovate Bot
e365f033d1 chore(deps): update dependency go-gitea/gitea to v1.22.3 2024-10-09 07:14:02 +00:00
Renovate Bot
b8e5fcc22d chore(deps): add renovate.json 2024-10-09 07:13:02 +00:00
Girish Ramakrishnan
a176ab5f20 Add renovate 2024-10-09 07:11:32 +00:00
Girish Ramakrishnan
9b773524ce add ci files 2024-10-09 09:08:28 +02:00
8 changed files with 69 additions and 49 deletions

5
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,5 @@
include:
- project: devops/pipeline-components
ref: main
file: cloudron-app.gitlab-ci.yml

View File

@@ -1629,3 +1629,17 @@
* Set owner id to zero when GetRegistrationToken for repo (#31725) (#31729)
* Fix API endpoint for registration-token (#31722) (#31728)
* Add permission check when creating PR (#31033) (#31720)
[1.33.3]
* Update Gitea to 1.22.3
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.22.3)
* Fix bug when a token is given public only (#32204) (#32218)
* Increase cacheContextLifetime to reduce false reports (#32011) (#32023)
* Don't join repository when loading action table data (#32127) (#32143)
* Fix javascript error when an anonymous user visits migration page (#32144) (#32179)
* Don't init signing keys if oauth2 provider is disabled (#32177)
* Fix wrong status of Set up Job when first step is skipped (#32120) (#32125)
* Fix bug when deleting a migrated branch (#32075) (#32123)
* Truncate commit message during Discord webhook push events (#31970) (#32121)
* Allow to set branch protection in an empty repository (#32095) (#32119)
* Fix panic when cloning with wrong ssh format. (#32076) (#32118)

View File

@@ -4,8 +4,8 @@
"author": "Gitea developers",
"description": "file://DESCRIPTION.md",
"tagline": "A painless self-hosted Git Service",
"version": "1.33.2",
"upstreamVersion": "1.22.2",
"version": "1.33.3",
"upstreamVersion": "1.22.3",
"healthCheckPath": "/explore",
"httpPort": 3000,
"memoryLimit": 536870912,

View File

@@ -19,9 +19,10 @@ WORKDIR /home/git
# for autosign feature
ENV GNUPGHOME="/app/data/gnupg"
ARG VERSION=1.22.2
# renovate: datasource=github-releases depName=go-gitea/gitea versioning=semver extractVersion=^v(?<version>.+)$
ARG GITEA_VERSION=1.22.3
RUN curl -L https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \
RUN curl -L https://dl.gitea.io/gitea/${GITEA_VERSION}/gitea-${GITEA_VERSION}-linux-amd64 -o /home/git/gitea/gitea \
&& chmod +x /home/git/gitea/gitea
# setup config paths

6
renovate.json Normal file
View File

@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>devops/renovator//config/app/default.json5"
]
}

28
test/package-lock.json generated
View File

@@ -9,10 +9,10 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"chromedriver": "^128.0.1",
"chromedriver": "^129.0.2",
"expect.js": "^0.3.1",
"mocha": "^10.7.3",
"selenium-webdriver": "^4.24.0",
"selenium-webdriver": "^4.25.0",
"superagent": "^10.1.0"
}
},
@@ -270,9 +270,9 @@
}
},
"node_modules/chromedriver": {
"version": "128.0.1",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-128.0.1.tgz",
"integrity": "sha512-UmWqZXXAyuRa37pE+lnU46vJcCM/y0ddF015LHxycEOYfuqsK7k9ZxJuXCQNWbws9e7FAMQj/GJZT92WPgis0g==",
"version": "129.0.2",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-129.0.2.tgz",
"integrity": "sha512-rUEFCJAmAwOdFfaDFtveT97fFeA7NOxlkgyPyN+G09Ws4qGW39aLDxMQBbS9cxQQHhTihqZZobgF5CLVYXnmGA==",
"hasInstallScript": true,
"dependencies": {
"@testim/chrome-version": "^1.1.4",
@@ -1425,9 +1425,9 @@
]
},
"node_modules/selenium-webdriver": {
"version": "4.24.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.24.0.tgz",
"integrity": "sha512-qrqoHhHPZuKLiz5VAQUxrn3ILs7/cYqn2/x96r35g5JjkLUjOS1lX+F+tEJKhRMlQ/MGJ+N1016JF5g2xZUFzw==",
"version": "4.25.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.25.0.tgz",
"integrity": "sha512-zl9IX93caOT8wbcCpZzAkEtYa+hNgJ4C5GUN8uhpzggqRLvsg1asfKi0p1uNZC8buYVvsBZbx8S+9MjVAjs4oA==",
"dependencies": {
"@bazel/runfiles": "^5.8.1",
"jszip": "^3.10.1",
@@ -1982,9 +1982,9 @@
}
},
"chromedriver": {
"version": "128.0.1",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-128.0.1.tgz",
"integrity": "sha512-UmWqZXXAyuRa37pE+lnU46vJcCM/y0ddF015LHxycEOYfuqsK7k9ZxJuXCQNWbws9e7FAMQj/GJZT92WPgis0g==",
"version": "129.0.2",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-129.0.2.tgz",
"integrity": "sha512-rUEFCJAmAwOdFfaDFtveT97fFeA7NOxlkgyPyN+G09Ws4qGW39aLDxMQBbS9cxQQHhTihqZZobgF5CLVYXnmGA==",
"requires": {
"@testim/chrome-version": "^1.1.4",
"axios": "^1.7.4",
@@ -2802,9 +2802,9 @@
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"selenium-webdriver": {
"version": "4.24.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.24.0.tgz",
"integrity": "sha512-qrqoHhHPZuKLiz5VAQUxrn3ILs7/cYqn2/x96r35g5JjkLUjOS1lX+F+tEJKhRMlQ/MGJ+N1016JF5g2xZUFzw==",
"version": "4.25.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.25.0.tgz",
"integrity": "sha512-zl9IX93caOT8wbcCpZzAkEtYa+hNgJ4C5GUN8uhpzggqRLvsg1asfKi0p1uNZC8buYVvsBZbx8S+9MjVAjs4oA==",
"requires": {
"@bazel/runfiles": "^5.8.1",
"jszip": "^3.10.1",

View File

@@ -9,10 +9,10 @@
"author": "",
"license": "ISC",
"dependencies": {
"chromedriver": "^128.0.1",
"chromedriver": "^129.0.2",
"expect.js": "^0.3.1",
"mocha": "^10.7.3",
"selenium-webdriver": "^4.24.0",
"selenium-webdriver": "^4.25.0",
"superagent": "^10.1.0"
}
}

View File

@@ -1,11 +1,7 @@
#!/usr/bin/env node
/* jshint esversion: 8 */
/* global it:false */
/* global xit:false */
/* global describe:false */
/* global before:false */
/* global after:false */
/* global it, xit, describe, before, after, afterEach */
'use strict';
@@ -29,21 +25,23 @@ describe('Application life cycle test', function () {
const TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 5000;
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
const LOCATION = 'test';
const LOCATION = process.env.LOCATION || 'test';
const SSH_PORT = 29420;
let app, browser;
var athenticated_by_oidc = false;
let athenticated_by_oidc = false;
const repodir = '/tmp/testrepo';
const reponame = 'testrepo';
const username = process.env.USERNAME;
const password = process.env.PASSWORD;
const email = process.env.EMAIL;
before(function () {
browser = new Builder().forBrowser('chrome').setChromeOptions(new Options().windowSize({ width: 1280, height: 1024 })).build();
const chromeOptions = new Options().windowSize({ width: 1280, height: 1024 });
if (process.env.CI) chromeOptions.addArguments('no-sandbox', 'disable-dev-shm-usage', 'headless');
browser = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
if (!fs.existsSync('./screenshots')) fs.mkdirSync('./screenshots');
});
after(function () {
@@ -51,8 +49,19 @@ describe('Application life cycle test', function () {
fs.rmSync(repodir, { recursive: true, force: true });
});
afterEach(async function () {
if (!process.env.CI || !app) return;
const currentUrl = await browser.getCurrentUrl();
if (!currentUrl.includes(app.domain)) return;
expect(this.currentTest.title).to.be.a('string');
const screenshotData = await browser.takeScreenshot();
fs.writeFileSync(`./screenshots/${new Date().getTime()}-${this.currentTest.title.replaceAll(' ', '_')}.png`, screenshotData, 'base64');
});
function getAppInfo() {
var inspect = JSON.parse(execSync('cloudron inspect'));
const inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
expect(app).to.be.an('object');
}
@@ -132,7 +141,8 @@ describe('Application life cycle test', function () {
}
async function addPublicKey() {
var publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
const publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
execSync(`chmod g-rw,o-rw ${__dirname}/id_ed25519`); // ssh will complain about perms later
await browser.get('https://' + app.fqdn + '/user/settings/keys');
@@ -147,25 +157,9 @@ describe('Application life cycle test', function () {
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
}
async function addPublicKeyOld() {
var publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
await browser.get('https://' + app.fqdn + '/user/settings/keys');
await browser.wait(until.elementLocated(By.id('add-ssh-button')), TIMEOUT);
await browser.findElement(By.id('add-ssh-button')).click();
await browser.findElement(By.id('ssh-key-title')).sendKeys('testkey');
await browser.findElement(By.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
var button = browser.findElement(By.xpath('//button[contains(text(), "Add Key")]'));
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
await browser.findElement(By.xpath('//button[contains(text(), "Add Key") and contains(@class, "green")]')).click();
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
}
async function createRepo() {
var getRepoPage = await browser.get('https://' + app.fqdn + '/repo/create');
await browser.get(`https://${app.fqdn}/repo/create`);
await browser.wait(until.elementLocated(By.id('repo_name')));
await browser.findElement(By.id('repo_name')).sendKeys(reponame);
var button = browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]'));
await browser.executeScript('arguments[0].scrollIntoView(true)', button);